
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

317 Views
The StringBuilder.CopyTo() method in C# is used to copy the characters from a specified segment of this instance to a specified segment of a destination Char array.SyntaxThe syntax is as follows -public void CopyTo (int sourceIndex, char[] dest, int destIndex, int count);Above, the parameter sourceIndex is the starting position in this instance where characters will be copied from. The dest is the array where characters will be copied, whereas the destIndex is the starting position in destination where characters will be copied. The count parameter is the number of characters to be copied.ExampleLet us now see an example - Live Demousing ... Read More

300 Views
The Queue.Clone() method in C# is used to create a shallow copy of the Queue.SyntaxThe syntax is as follows -public virtual object Clone ();ExampleLet us now see an example - Live Demousing System; using System.Collections; public class Demo { public static void Main(string[] args) { Queue queue = new Queue(); queue.Enqueue("One"); queue.Enqueue("Two"); queue.Enqueue("Three"); queue.Enqueue("Four"); queue.Enqueue("Five"); queue.Enqueue("Six"); queue.Enqueue("Seven"); queue.Enqueue("Eight"); Console.WriteLine("Queue..."); foreach(string str in queue) { ... Read More

233 Views
The Queue.Clear() method in C# is used to clear all object from Queue.SyntaxThe syntax is as follows -public virtual void Clear ();ExampleLet us now see an example - Live Demousing System; using System.Collections.Generic; public class Demo { public static void Main() { Queue queue = new Queue(); queue.Enqueue(100); queue.Enqueue(200); queue.Enqueue(300); queue.Enqueue(400); queue.Enqueue(500); queue.Enqueue(600); queue.Enqueue(700); queue.Enqueue(800); queue.Enqueue(900); queue.Enqueue(1000); Console.WriteLine("Queue..."); foreach(int i in ... Read More

194 Views
The Double.IsPositiveInfinity() method in C# is used to return a value indicating whether the specified number evaluates to positive infinity.SyntaxThe syntax is as follows -public static bool IsPositiveInfinity (double val);Above, val is a double-precision floating-point number.ExampleLet us now see an example - Live Demousing System; public class Demo { public static void Main() { double d = 1.0/0.0; Console.WriteLine("Double Value = "+d); Console.WriteLine("HashCode of Double Value = "+d.GetHashCode()); TypeCode type = d.GetTypeCode(); Console.WriteLine("TypeCode of Double Value = "+type); Console.WriteLine("Positive Infinity? = "+Double.IsInfinity(d)); ... Read More

116 Views
The StringBuilder.Chars[] property gets or sets the character at the specified character position in this instance.SyntaxThe syntax is as follows -public char this[int index] { get; set; }Above, the index parameter is the position of the character.ExampleLet us now see an example - Live Demousing System; using System.Text; public class Demo { public static void Main() { StringBuilder strBuilder = new StringBuilder("ghgh78hkjj"); int num = 0; for (int i = 0; i < strBuilder.Length; i++) { char c = strBuilder[i]; if (Char.IsDigit(c)) ... Read More

272 Views
The Thread.CurrentThread propertyin C# is used to get the currently running thread.SyntaxThe syntax is as follows -public static System.Threading.Thread CurrentThread { get; }ExampleLet us now see an example - Live Demousing System; using System.Threading; public class Demo { public static void Main() { Thread thread = new Thread(new ThreadStart(demo1)); ThreadPool.QueueUserWorkItem(new WaitCallback(demo2)); thread = Thread.CurrentThread; thread.Name ="Demo Thread"; Console.WriteLine("Current running Thread = "+thread.Name); Console.WriteLine("Current state of Thread = "+thread.ThreadState); Console.WriteLine("ManagedThreadId = "+thread.ManagedThreadId); } public static void demo1() { ... Read More

873 Views
Following are the properties of the String class in C# −Sr.NoProperty & Description1CharsGets the Char object at a specified position in the current String object.2LengthGets the number of characters in the current String object.ExampleLet us see an example - Live Demousing System; public class Demo { public static void Main() { string str1 = "h8b9"; string str2 = "abcdef"; Console.WriteLine("Is string1 null or empty? = "+string.IsNullOrEmpty(str1)); Console.WriteLine("Is string2 null or empty? = "+string.IsNullOrEmpty(str2)); bool val = str1 != str2; Console.WriteLine("Is str1 equal ... Read More

1K+ Views
The String.ToUpperInvariant() method in C# is used to return a copy of this String object converted to uppercase using the casing rules of the invariant culture.SyntaxThe syntax is as follows -public string ToUpperInvariant ();ExampleLet us now see an example - Live Demousing System; using System.Text; public class Demo { public static void Main(String[] args) { string str1 = "one"; string str2 = "TWO"; string str3 = "ThrEE"; Console.WriteLine("String 1 = "+str1); Console.WriteLine("String1 ToUpperInvariant = "+str1.ToUpperInvariant()); Console.WriteLine("String 2 = "+str2); ... Read More

1K+ Views
The String.ToLowerInvariant() method in C# is used to return a copy of this String object converted to lowercase using the casing rules of the invariant culture.SyntaxThe syntax is as follows -public string ToLowerInvariant ();ExampleLet us now see an example - Live Demousing System; using System.Text; public class Demo { public static void Main(String[] args) { string str1 = "Pink Floyd"; string str2 = "Ariana"; Console.WriteLine("String 1 = "+str1); Console.WriteLine("String1 ToLowerInvariant = "+str1.ToLowerInvariant()); Console.WriteLine("String 2 = "+str2); Console.WriteLine("String2 ToLowerInvariant = "+str2.ToLowerInvariant()); ... Read More

370 Views
The TimeSpan.FromTicks() method in C# is used to return a TimeSpan that represents a specified time, where the specification is in units of ticks.SyntaxThe syntax is as follows -public static TimeSpan FromTicks (long val);Above, the parameter val is the number of ticks that represent a time.ExampleLet us now see an example - Live Demousing System; public class Demo { public static void Main() { TimeSpan span1 = TimeSpan.FromTicks(18768768); TimeSpan span2 = new TimeSpan(-9, 45, 50); TimeSpan span3 = TimeSpan.FromHours(5); TimeSpan span4 = TimeSpan.FromMilliseconds(10000); TimeSpan span5 ... Read More