- 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
Found 2628 Articles for Csharp
![Nitin Sharma](https://www.tutorialspoint.com/assets/profiles/134888/profile/60_107635-1568620292.jpg)
3K+ Views
In C# there are two mechanisms for redefining or providing the new implementation of a method of parent class by its child class and these two mechanisms are known as Method overriding and Method hiding. Now on the basis of how method re-implementation is done we can distinguish between both of them.Following are the important differences between Method Overriding and Method Hiding.Sr. No.KeyMethod OverridingMethod Hiding1DefinitionMethod Overriding is a mechanism to achieve polymorphism where the super class and sub class have same methods, including the parameters and signature and, when you call it using the sub class object, the implementation in ... Read More
![Nitin Sharma](https://www.tutorialspoint.com/assets/profiles/134888/profile/60_107635-1568620292.jpg)
629 Views
Both SortedList and SortedDictionary in C# are the types of data structures used for data storage, now on the basis of characteristics and nature we can distinguish between both of them.Following are the important differences between SortedList and SortedDictionary.Sr. No.KeySortedListSortedDictionary1Memory organizationSortedList requires low memory for storage hence the memory status in its case is overhead.On other hand SortedDictionary requires more memory for storage so memory status in its case is not bottlenecked.2DesignedSortedList is internally implemented as in sortedList the elements are stored in a continuous block in memory.On other hand in SortedDictionary the elements are stored in separate object that ... Read More
![Nitin Sharma](https://www.tutorialspoint.com/assets/profiles/134888/profile/60_107635-1568620292.jpg)
743 Views
In order to differentiate between Class and Structure, we have to first understand that both structure and class seems to be equivalent in the context of holding and defining the data. Both of these could define as well as hold some default values in their data members. But if we consider them beyond this context then Class provides more flexibility along with functionality as compared to the Structure.Following are the important differences between Class and Structure.Sr. No.KeyClassStructure1Data TypeData defined in a class is stored in the memory as a reference and has particular address in order to get accessed, so ... Read More
![Nitin Sharma](https://www.tutorialspoint.com/assets/profiles/134888/profile/60_107635-1568620292.jpg)
5K+ Views
Both HashTable and Dictionary are the type of data structure which are used to store data. Both of these data structures hold the stored data in key value pair.On the basis of difference between key features of these we can distinguish between HashTable and Dictionary as follows −Sr. No.KeyHashTableDictionary1DefinitionHashTable is the non-generic type of collection which is used to store data in key/value pair and is defined in System.Collections name space.On other hand Dictionary is a generic type collection defined under System.Collection.Generics name space which also store data in the form of key/value pairs.2DataTypeIn HashTable same or different data type ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
16K+ Views
out keywordout keyword is used to pass arguments to method as a reference type and is primary used when a method has to return multiple values. ref keyword is also used to pass arguments to method as reference type and is used when existing variable is to be modified in a method. Following is the valid usage of ref and out keywords in C#.Example Live Demousing System.IO; using System; public class Program { public static void update(out int a){ a = 10; } public static void change(ref int d){ d = 11; ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
11K+ Views
readonly keywordreadonly keyword is used to define a variable which can be assigned once after declaration either during declaration or in constructor. const keyword is used to define a constant to be used in the program. Following is the valid usage of a readonly and const keywords in C#.Example Live Demousing System.IO; using System; public class Program { public const int VALUE = 10; public readonly int value1; Program(int value){ value1 = value; } public static void Main() { Console.WriteLine(VALUE); Program p1 = new Program(11); ... Read More
![Ajay yadav](https://www.tutorialspoint.com/assets/profiles/152707/profile/60_183870-1577075932.jpg)
5K+ Views
The .NET centric applications are meant to windows operating system up till now, but now Microsoft has introduced a new cross-platform application called Mono which enables the execution of the application developed under the .NET platform in Linux environment by giving an impression in such a way that as if we are running Linux package rather than executing .exe file.MonoMono is an open-source utility that allows the developer to execute .NET centric applications on other platforms such as Mac or Linux as it provides an installation package for Windows platform to compile and execute .NET assemblies on Windows OS without ever ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
2K+ Views
As we know that exception is something that refers to the interruption in the flow of program or application. This unwanted event is known as Exception and is generally gives the indication regarding something wrong within the code. Basically particularly in language C# an exception can be a System or an Application Level exception. So on the basisSr. No.KeySystem level exceptionApplication level exception1DerivationSystem exceptions are derived from the base class System.SystemException which in itself is a derived class of SystemException.On other hand Application-level exceptions are derived from the base class System.ApplicationException which is again a derived class of SystemException2OccurrenceIn general ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
2K+ Views
As we all know that C# is an object oriented programming just like Java and provides full support for object-oriented concepts that are Encapsulation, Abstraction, Inheritance, and Polymorphism. In contrast to Abstraction both Abstract class and Interface are coming out in picture as both of these provides abstraction in C# program.In an abstract class, we can create the functionality and that needs to be implemented by the derived class. The interface allows us to define the functionality or functions but cannot implement that. The derived class extend the interface and implement those functions.Following are the important differences between Abstract Class ... Read More
![Mahesh Parahar](https://www.tutorialspoint.com/assets/profiles/127878/profile/60_2277600-1655382864.jpg)
5K+ Views
As we know that programming in any language get starts with declaration a variable after which its definition and logic implementation take place. So it is one of the most important factors to know that how to declare variable in any programming language before starts coding in it.Now if we take an instance of C# language there is change in declaration in variable with the advancement in the language. As in former version of C# all the code written was validated at the compile time itself which made it as Static typed language where variables are getting declared using var ... Read More