Search for your favorite C# Examples

 

 

Below are the most used CSharp apis.

 API  Number of Usages 
string.IsNullOrEmpty(string) 83625
NUnit.Framework.Assert.AreEqual(object, object) 72725
string.Format(System.IFormatProvider, string, params object[]) 63026
System.Collections.Generic.IEnumerable.Count() 54991
object.GetType() 45400
System.Text.StringBuilder.ToString() 42038
string.Format(string, object) 41075
System.Collections.Generic.IEnumerable.Select(System.Func) 36879
NUnit.Framework.Is.EqualTo(object) 33637
System.Text.StringBuilder.Append(string) 31654
NUnit.Framework.Assert.That(NUnit.Framework.TestDelegate, NUnit.Framework.Constraints.IResolveConstraint) 30771
System.Console.WriteLine(string) 29929
System.Collections.Generic.IEnumerable.Where(System.Func) 26746
object.ToString() 26717
System.Diagnostics.Debug.Assert(bool) 25724
NUnit.Framework.Assert.IsTrue(bool) 25529
Xunit.Assert.Equal(string, string, bool, bool, bool) 25449
System.Collections.Generic.List.Add(string) 24853
string.Substring(int, int) 24312
string.Replace(string, string) 23865
System.Collections.Generic.IEnumerable.ToList() 23416
string.Format(string, object, object) 22764
string.IsNullOrWhiteSpace(string) 22261
System.Collections.Generic.List.ToArray() 21998
System.IO.File.Exists(string) 21601
System.Collections.Generic.IEnumerable.ToArray() 21444
string.Split(params char[]) 19795
int.ToString() 19754
System.Collections.Generic.Dictionary.ContainsKey(string) 19412
System.IDisposable.Dispose() 19047
System.Diagnostics.Debug.Assert(bool, string, string, params object[]) 18536
System.IO.Path.Combine(string, string) 18479
string.Trim() 17375
string.Substring(int) 16821
System.Diagnostics.Debug.WriteLine(string) 16168
System.Console.WriteLine(string, params object[]) 15968
System.Collections.Generic.List.AddRange(System.Collections.Generic.IEnumerable) 15849
string.ToLower() 15839
object.ReferenceEquals(object, object) 15787
System.Collections.Generic.List.Clear() 15462
System.Text.Encoding.GetBytes(string) 15444
System.Guid.NewGuid() 15233
NUnit.Framework.Assert.That(object, NUnit.Framework.Constraints.IResolveConstraint) 14977
object.Equals(object, object) 14801
string.StartsWith(string) 13937
string.Contains(string) 13381
NUnit.Framework.Assert.AreEqual(int, int) 12807
Moq.Mock.Setup(System.Linq.Expressions.Expression) 12613
NUnit.Framework.Assert.IsNotNull(object) 12507
NUnit.Framework.Assert.IsFalse(bool) 12108
System.IO.Path.Combine(params string[]) 11862
System.Threading.Thread.Sleep(int) 11315
System.Text.StringBuilder.Append(char) 10806
System.Collections.Generic.IEnumerable.Any() 10792
System.IO.Directory.Exists(string) 10671
System.Collections.Generic.IEnumerable.FirstOrDefault(System.Func) 10534
System.Func.Invoke() 10525
NUnit.Framework.Assert.Throws(NUnit.Framework.TestDelegate) 10479
System.Collections.Generic.IEnumerable.Any(System.Func) 10476
string.Format(string, params object[]) 10465
System.Action.Invoke() 10405
System.Threading.Tasks.Task.ConfigureAwait(bool) 10048
Moq.It.IsAny() 10015
System.Exception.ToString() 9985
System.Text.StringBuilder.Append(char*, int) 9825
System.Collections.Generic.IEnumerable.First() 9703
System.IO.Path.GetDirectoryName(string) 9518
System.TimeSpan.FromSeconds(double) 9406
System.EventHandler.Invoke(object, System.EventArgs) 9315
System.Diagnostics.Debug.Assert(bool, string) 9243
string.Equals(string) 8852
System.Type.IsAssignableFrom(System.Type) 8578
System.Guid.ToString() 8577
System.Text.StringBuilder.AppendLine(string) 8576
System.Array.Copy(System.Array, int, System.Array, int, int) 8328
string.Format(string, object, object, object) 8283
int.Parse(string) 8228
System.Collections.Generic.List.RemoveAt(int) 7932
System.Collections.Generic.Dictionary.Add(string, object) 7840
System.IO.TextWriter.WriteLine(string) 7784
System.Convert.ToBoolean(object) 7581
System.IO.File.Delete(string) 7540
System.IO.Stream.Close() 7447
Moq.Mock.Verify() 7445
System.GC.SuppressFinalize(object) 7341
System.IO.Path.GetFileName(string) 7317
string.EndsWith(string) 7313
System.Reflection.MethodBase.Invoke(object, object[]) 7282
System.Math.Min(int, int) 7259
string.GetHashCode() 7244
System.IO.MemoryStream.ToArray() 7144
System.Collections.IEnumerator.MoveNext() 7105
System.Windows.Forms.Control.SuspendLayout() 7089
string.Join(string, System.Collections.Generic.IEnumerable) 6978
System.Collections.Generic.IEnumerable.FirstOrDefault() 6879
System.IO.Directory.CreateDirectory(string) 6846
string.IndexOf(char) 6814
System.Type.GetTypeInfo() 6814
System.Windows.Forms.Control.ResumeLayout(bool) 6781
System.IO.StreamReader.ReadToEnd() 6736