AmitDiwan has Published 10740 Articles

Get the number of strings in StringCollection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:18:59

107 Views

To get the number of strings in StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringCollection strCol = new StringCollection();       String[] strArr = new String[] { "A", "B", "C", "D", "E", ... Read More

Get or set the value associated with the specified key in StringDictionary in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:14:47

115 Views

To get or set the value associated with specified key in StringDictionary, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringDictionary strDict = new StringDictionary ();       strDict.Add("A", "Books");       strDict.Add("B", ... Read More

Remove from the specified index of the StringCollection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:10:53

161 Views

To remove from the specified index of the StringCollection, the code is as follows −Example Live Demousing System; using System.Collections.Specialized; public class Demo {    public static void Main() {       StringCollection stringCol = new StringCollection();       String[] arr = new String[] { "100", "200", "300", "400", ... Read More

How to get Seventh Element of the Tuple in C#?

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:06:35

127 Views

To get seventh element of the Tuple, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main(String[] args) {       var tuple1 = Tuple.Create(75, 200, 500, 700, 100, 1200, 1500);       var tuple2 = Tuple.Create(75, 200, 500, 700, 100, ... Read More

Remove all elements from the Hashtable in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 12:03:24

230 Views

To remove all elements from the Hashtable, the code is as follows −Example Live Demousing System; using System.Collections; public class Demo {    public static void Main() {       Hashtable hash = new Hashtable(10);       hash.Add("1", "A");       hash.Add("2", "B");       hash.Add("3", "C"); ... Read More

Remove all elements from the Collection in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 11:58:52

466 Views

To remove all elements from the Collection, the code is as follows −Example Live Demousing System; using System.Collections.ObjectModel; public class Demo {    public static void Main() {       Collection col = new Collection();       col.Add(10);       col.Add(20);       col.Add(30);       ... Read More

Check whether the specified Unicode character is a punctuation mark in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 11:53:57

296 Views

To check whether the specified Unicode character is a punctuation mark, the code is as follow −Example Live Demousing System; public class Demo {    public static void Main() {       bool res;       char val = 'q';       Console.WriteLine("Value = "+val);       ... Read More

Get the hash code for the current Int64 instance in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 11:51:00

163 Views

To get the hash code for the current Int64 instance, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       long val1 = 8768768768;       long val2 = 7889765555;       Console.WriteLine("Value1 = "+val1);     ... Read More

Compare this instance is equal to a specified object or Int64 in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 11:45:31

106 Views

To compare this instance is equal to a specified object or Int64, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       long val1 = 150;       long val2 = 240;       Console.WriteLine("Value1 = "+val1); ... Read More

Check whether the Unicode character is a lowercase letter in C#

AmitDiwan

AmitDiwan

Updated on 05-Dec-2019 11:30:32

268 Views

To check whether the Unicode character is a lowercase letter, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       bool res;       char val = 'K';       Console.WriteLine("Value = "+val);       res ... Read More

Advertisements