- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Arjun Thakur has Published 1109 Articles
Arjun Thakur
432 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
Arjun Thakur
985 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
Arjun Thakur
773 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
Arjun Thakur
2K+ 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
Arjun Thakur
255 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
Arjun Thakur
298 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
Arjun Thakur
66 Views
The Array.IsSynchronized property in C gets a value indicating whether access to the Array is synchronized.The IsSynchronized property is implemented by Arrays because it is needed by the System.Collections.ICollection interface. Classes using arrays can also implement own synchronization using the SyncRoot property.The following is the syntax −public bool IsSynchronized { ... Read More
Arjun Thakur
282 Views
To determine if a string has unique characters or not, firstly check a word in the string with the next word −for (int j = i + 1; j < val.Length; j++) { if (val[i] == val[j]) }If you find a match, that would mean the string do not ... Read More
Arjun Thakur
135 Views
Interning of string optimizes memory and performance.Through this, you can put strings in the runtime's shared string pool.Let us see an example −Example Live Demousing System; using System.Text; public class Demo { public static void Main() { string str1 = new StringBuilder().Append("Car is a ").Append("Vehicle").ToString(); ... Read More
Arjun Thakur
243 Views
The file not found exception is raised when you try to find a file that does not exist.Let’s say I have set a file in StreamReader, “new.txt” that does not exist. If you will try to access it using StreamReader(to read it), it will throw FileNotFoundException −using (StreamReader sReader = ... Read More