Karthikeya Boyini has Published 2193 Articles

What is a base class in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:35:47

2K+ Views

When creating a class, instead of writing completely new data members and member functions, the programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class is referred to as the derived class.A class ... Read More

What is the best IDE for C# besides Visual Studio?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:33:18

1K+ Views

The alternative for Visual Studio IDE to run C# programs −SharpDevelopIt is an open source IDE to run C# programs but works only Microsoft Windows. SharpDevelop was developed as an alternative to Visual Studio. It is written in C#. Supports Git, SVN, NuGet, LINQPadIt is a utility that allows you ... Read More

Thread Pools in C#

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:31:47

4K+ Views

Thread pool in C# is a collection of threads. It is used to perform tasks in the background. When a thread completes a task, it is sent to the queue wherein all the waiting threads are present. This is done so that it can be reused.Let us see how to ... Read More

Substring in C#

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:24:37

626 Views

Substring is used to get the sub-parts of a string in C#. We have the substring() method for this purpose. Use the substring() method in C# to check each and every substring for unique characters. Loop it until the length of the string.If anyone the substring matches another, then it ... Read More

Try/catch/finally/throw keywords in C#

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:20:08

2K+ Views

Exception handling is based on the following keywords and its usage −try − A try block identifies a block of code for which particular exceptions is activated. It is followed by one or more catch blocks.catch − A program catches an exception with an exception handler at the place in ... Read More

What is the base class for all data types in C#.NET?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:12:27

2K+ Views

Object is the base class for all data types in C#. The Object Type is the ultimate base class for all data types in C# Common Type System (CTS). The object is an alias for System.Object class.When a value type is converted to object type, it is called boxing and ... Read More

How to use NameValueCollection class in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 17:10:28

689 Views

The NameValueCollection sets more than one value for a single key. Now let us see how to use them in our C# program.Set the collection −static NameValueCollection GetCollection() {    NameValueCollection myCollection = new NameValueCollection();    myCollection.Add("Tim", "One");    myCollection.Add("John", "Two");    myCollection.Add("Jamie", "Three");    return myCollection; }Now with the ... Read More

What are Tuples in C#4.0?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 16:04:01

815 Views

Tuples has a sequence of elements of different data types. It was introduced to return an instance of the Tuple with no need to specify the type of each element separately.Let us create a tuple with two elements. The following is how you declare a tuple. −Tupleperson = new Tuple ... Read More

Intersection of two arrays in C#

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 16:01:36

5K+ Views

To get intersection of two arrays, use the Intersect method. It is an extension method from the System.Linq namespace.The method returns the common elements between the two arrays.Set the two arrays first −int[] arr1 = { 44, 76, 98, 34 }; int[] arr2 = { 24, 98, 44, 55, 47, ... Read More

What is the difference between type conversion and type casting in C#?

karthikeya Boyini

karthikeya Boyini

Updated on 20-Jun-2020 15:59:33

457 Views

Type conversion and type casting are the same in C#. It is converting one type of data to another type. In C#, type casting has two forms −Implicit type conversion − These conversions are performed by C# in a type-safe manner. For example, are conversions from smaller to larger integral ... Read More

Advertisements