Monday, September 3, 2018

Repeat character without loop in C#

 you can use string constructor that accepts a char and the number of times to repeat it.

Example:

public class Program
{
public static void Main()
{
string tabs = new String('X',  4);
Console.WriteLine(tabs);
}
}

OUTPUT:
XXXX

Hash Table in C#

 The Hashtable is a non-generic collection and used to store the key/value pairs based on the hash code of the key. Key will be used to acce...