随笔分类 - 技术目录十[C#]
摘要:// Get and set thread's current principal (for role based security). // 获取并设置线程的当前主体(用于基于角色的安全性)。 public static IPrincipal CurrentPrincipal { [System.
阅读全文
摘要:C#中线程占用内存过大解决方法 项目中用到了多线程,而且是1000线程并发运行,发现内存占用过高,于是对项目里用到的对象逐个测试,发现是线程对象占用内存 Thread[] threads = new Thread[1000]; for(int i = 0; i) { (threads[i] = ne
阅读全文
摘要:namespace System.Threading { using System.Security.Permissions; using System.Threading; using System.Runtime.InteropServices; [ComVisibleAttribute(fal
阅读全文
摘要:public sealed class Thread : CriticalFinalizerObject, _Thread { [System.Security.SecuritySafeCritical] // auto-generated public Thread(ThreadStart sta
阅读全文
摘要:[ClassInterface(ClassInterfaceType.None)] [ComDefaultInterface(typeof(_Thread))] [ComVisible(true)] public sealed class Thread : CriticalFinalizerObje
阅读全文
摘要:public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) { if (source == null) { ThrowHelper
阅读全文
摘要:public class MyList<T> { private int _size; internal T[] _items; // Do not rename (binary serialization) private static readonly T[] s_emptyArray = ne
阅读全文
摘要:// Gets the length of this string // // This is an intrinsic function so that the JIT can recognise it specially // and eliminate checks on character
阅读全文
摘要:public class BackCard { public string UserName { get; set; } public string id { get; set; } public void CunQian() { } public void Overdraft() { } } //
阅读全文
摘要:public TypeCode GetTypeCode() { return TypeCode.String; }
阅读全文
摘要:// Determines whether two Strings match. [Pure] public static bool Equals(String a, String b) { if ((Object)a==(Object)b) { return true; } if ((Object
阅读全文
摘要:// Determines whether a specified string is a suffix of the the current instance. // // The case-sensitive and culture-sensitive option is set by opti
阅读全文
摘要:[ComVisible(true)] public enum TypeCode { Empty = 0, Object = 1, DBNull = 2, Boolean = 3, Char = 4, SByte = 5, Byte = 6, Int16 = 7, UInt16 = 8, Int32
阅读全文
摘要:[Pure] public bool Contains( string value ) { return ( IndexOf(value, StringComparison.Ordinal) >=0 ); } [Pure] [System.Security.SecuritySafeCritical]
阅读全文
摘要:[Pure] public int CompareTo(Object value) { if (value == null) { return 1; } if (!(value is String)) { throw new ArgumentException(Environment.GetReso
阅读全文
摘要:// Method required for the ICloneable interface.IClonable接口所需的方法。 // There's no point in cloning a string since they're immutable, so we simply return
阅读全文
摘要:[Pure] public static bool IsNullOrWhiteSpace(String value) { if (value == null) return true; for(int i = 0; i < value.Length; i++) { if(!Char.IsWhiteS
阅读全文
摘要:[Pure] public static bool IsNullOrEmpty(String value) { return (value == null || value.Length == 0); }
阅读全文
摘要:[System.Security.SecuritySafeCritical] // auto-generated public static String Intern(String str) { if (str==null) { throw new ArgumentNullException("s
阅读全文
浙公网安备 33010602011771号