Arjun Thakur has Published 1025 Articles

What is the best IDE for C# on Linux?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 17:32:40

2K+ Views

On Windows, the best IDE to run C# programs is Visual Studio. On Linux, the best IDE can be considered as Monodevelop. It is an open source IDE that allows you to run C# on multiple platforms i.e. Windows, Linux and MacOS. Monodevelop is also known as Xamarin Studio. It ... Read More

What is the base class for all exceptions in C#?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 17:26:45

2K+ Views

The System.SystemException class is the base class for all predefined system exception. Some of the exception classes derived from the System.Exception class are the System.ApplicationException and System.SystemException classes.The System.ApplicationException class supports exceptions generated by application programs. Hence the exceptions defined by the programmers should derive from this class.The following are the exceptions ... Read More

What are objects in C#?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 17:01:58

1K+ Views

Like any other object-oriented language, C# also has object and classes. Objects are real-world entities and instance of a class. Access the members of the class using an object.To access the class members, you need to use the dot (.) operator after the object name. The dot operator links the ... Read More

Way to increment a character in C#

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:46:52

2K+ Views

Firstly, set a character−char ch = 'K';Now simply increment it like this −ch++;If you will print the character now, it would be the next character as shown in the following example −Example Live Demousing System; using System.Collections.Generic; class Demo {    static void Main() {       char ch ... Read More

What are integer literals in C#?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:44:54

657 Views

An integer literal can be a decimal, or hexadecimal constant. A prefix specifies the base or radix: 0x or 0X for hexadecimal, and there is no prefix id for decimal. It can also have a suffix that is a combination of U and L, for unsigned and long, respectively.Here are ... Read More

Sort list of dictionaries by values in C#

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:42:53

1K+ Views

Firstly, let us create a dictionary −var d = new Dictionary(5);Now add the key and value −// add key and value d.Add("car", 25); d.Add("bus", 28); d.Add("motorbike", 17);Use orderby to order by values −var val = from ele in d orderby ele.Value ascending select ele;We have set ascending above to sort ... Read More

What are identifiers in C#?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:37:21

1K+ Views

An identifier is a name used to identify a class, variable, function, or any other user-defined item. The basic rules for naming classes in C# are as follows −A name must begin with a letter that could be followed by a sequence of letters, digits (0 - 9) or underscore. ... Read More

Literals in C#

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:32:18

3K+ Views

The fixed values are called literals. The constants refer to fixed values that the program may not alter during its execution.Constants can be of any of the basic data types like an integer constant, a floating constant, a character constant, or a string literal. There are also enumeration constants as ... Read More

What does Array.SyncRoot property of array class do in C#?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:31:20

351 Views

The Array.SyncRoot property is used to get an object that can be used to synchronize access to the Array. The classes that have arrays can also use the SyncRoot property to implement their own synchronization.Enumerating through a collection is not a thread safe procedure. The other threads may modify the collection ... Read More

What are string literals in C#?

Arjun Thakur

Arjun Thakur

Updated on 20-Jun-2020 16:28:38

407 Views

String literals or constants are enclosed in double quotes "" or with @"". A string contains characters that are similar to character literals: plain characters, escape sequences, and universal characters.Here are some examples of String Literals −“Hi, User" "You’re Welcome, \The following is an example showing the usage of string ... Read More

Advertisements