随笔分类 -  技术目录十[C#]

摘要:// Get and set thread's current principal (for role based security). // 获取并设置线程的当前主体(用于基于角色的安全性)。 public static IPrincipal CurrentPrincipal { [System. 阅读全文
posted @ 2021-11-22 13:48 vba是最好的语言 阅读(238) 评论(0) 推荐(0)
摘要:C#中线程占用内存过大解决方法 项目中用到了多线程,而且是1000线程并发运行,发现内存占用过高,于是对项目里用到的对象逐个测试,发现是线程对象占用内存 Thread[] threads = new Thread[1000]; for(int i = 0; i) { (threads[i] = ne 阅读全文
posted @ 2021-11-22 13:21 vba是最好的语言 阅读(340) 评论(0) 推荐(0)
摘要:namespace System.Threading { using System.Security.Permissions; using System.Threading; using System.Runtime.InteropServices; [ComVisibleAttribute(fal 阅读全文
posted @ 2021-11-22 11:23 vba是最好的语言 阅读(52) 评论(0) 推荐(0)
摘要:public sealed class Thread : CriticalFinalizerObject, _Thread { [System.Security.SecuritySafeCritical] // auto-generated public Thread(ThreadStart sta 阅读全文
posted @ 2021-11-22 11:17 vba是最好的语言 阅读(127) 评论(0) 推荐(0)
摘要:[ClassInterface(ClassInterfaceType.None)] [ComDefaultInterface(typeof(_Thread))] [ComVisible(true)] public sealed class Thread : CriticalFinalizerObje 阅读全文
posted @ 2021-11-22 10:37 vba是最好的语言 阅读(269) 评论(0) 推荐(0)
摘要:public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) { if (source == null) { ThrowHelper 阅读全文
posted @ 2021-11-20 15:21 vba是最好的语言 阅读(51) 评论(0) 推荐(0)
摘要:public class MyList<T> { private int _size; internal T[] _items; // Do not rename (binary serialization) private static readonly T[] s_emptyArray = ne 阅读全文
posted @ 2021-11-20 13:51 vba是最好的语言 阅读(65) 评论(0) 推荐(0)
摘要:// Gets the length of this string // // This is an intrinsic function so that the JIT can recognise it specially // and eliminate checks on character 阅读全文
posted @ 2021-11-20 11:57 vba是最好的语言 阅读(100) 评论(0) 推荐(0)
摘要:public class BackCard { public string UserName { get; set; } public string id { get; set; } public void CunQian() { } public void Overdraft() { } } // 阅读全文
posted @ 2021-11-19 16:33 vba是最好的语言 阅读(45) 评论(0) 推荐(0)
摘要:public TypeCode GetTypeCode() { return TypeCode.String; } 阅读全文
posted @ 2021-11-19 14:59 vba是最好的语言 阅读(40) 评论(0) 推荐(0)
摘要:// Determines whether two Strings match. [Pure] public static bool Equals(String a, String b) { if ((Object)a==(Object)b) { return true; } if ((Object 阅读全文
posted @ 2021-11-19 14:36 vba是最好的语言 阅读(37) 评论(0) 推荐(0)
摘要:// Determines whether a specified string is a suffix of the the current instance. // // The case-sensitive and culture-sensitive option is set by opti 阅读全文
posted @ 2021-11-19 14:35 vba是最好的语言 阅读(95) 评论(0) 推荐(0)
摘要:[ComVisible(true)] public enum TypeCode { Empty = 0, Object = 1, DBNull = 2, Boolean = 3, Char = 4, SByte = 5, Byte = 6, Int16 = 7, UInt16 = 8, Int32 阅读全文
posted @ 2021-11-19 14:29 vba是最好的语言 阅读(324) 评论(0) 推荐(0)
摘要:[Pure] public bool Contains( string value ) { return ( IndexOf(value, StringComparison.Ordinal) >=0 ); } [Pure] [System.Security.SecuritySafeCritical] 阅读全文
posted @ 2021-11-19 14:28 vba是最好的语言 阅读(228) 评论(0) 推荐(0)
摘要:[Pure] public int CompareTo(Object value) { if (value == null) { return 1; } if (!(value is String)) { throw new ArgumentException(Environment.GetReso 阅读全文
posted @ 2021-11-19 14:08 vba是最好的语言 阅读(63) 评论(0) 推荐(0)
摘要:// Method required for the ICloneable interface.IClonable接口所需的方法。 // There's no point in cloning a string since they're immutable, so we simply return 阅读全文
posted @ 2021-11-19 14:01 vba是最好的语言 阅读(36) 评论(0) 推荐(0)
摘要:[Pure] public static bool IsNullOrWhiteSpace(String value) { if (value == null) return true; for(int i = 0; i < value.Length; i++) { if(!Char.IsWhiteS 阅读全文
posted @ 2021-11-19 14:00 vba是最好的语言 阅读(29) 评论(0) 推荐(0)
摘要:[Pure] public static bool IsNullOrEmpty(String value) { return (value == null || value.Length == 0); } 阅读全文
posted @ 2021-11-19 13:59 vba是最好的语言 阅读(36) 评论(0) 推荐(0)
摘要:[System.Security.SecuritySafeCritical] // auto-generated public static String Intern(String str) { if (str==null) { throw new ArgumentNullException("s 阅读全文
posted @ 2021-11-19 13:55 vba是最好的语言 阅读(38) 评论(0) 推荐(0)