- 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
Nizamuddin Siddiqui has Published 2307 Articles
Nizamuddin Siddiqui
316 Views
In c#, Destructor is a special method of a class and it is used inside a class to destroy the object or instances of classes.There can be only one destructor inside a classFollowing are the properties of destructor in c#Destructors will not take any parametersDestructors will begin with a tilde ... Read More
Nizamuddin Siddiqui
3K+ Views
Select operator produces one result value for every source SelectMany Operator belong to Projection Operators category. It is used to project each element of a sequence to an IEnumerable and flattens the resulting sequences into one sequence.Exampleclass Demo{ public string Name { get; set; } public List Contents ... Read More
Nizamuddin Siddiqui
158 Views
Here in the example a static Demo class is created and a static variable count is declared.Here the count variable is treated as a global variable .so it keeps on increasing in the example ,because only one instance of the class is createdExamplestatic class Demo{ public static int count; ... Read More
Nizamuddin Siddiqui
1K+ Views
Make use of this keyword in c# to call one constructor from another constructorTo call a constructor which is present in parent class make use of base keywordExampleclass Demo{ public Demo(){ System.Console.WriteLine("Parameter less constructor called"); } public Demo(int firstNumber, int secondNumber) : this(){ ... Read More
Nizamuddin Siddiqui
562 Views
Static constructor are called automatically before the first instance is created or any static members are referenced.A static constructor is used to initialize any static data, or to perform a particular action that needs to be performed once only.In c#, only one static constructor is allowed to createStatic constructors have ... Read More
Nizamuddin Siddiqui
749 Views
Tuples are used when you want to return multiple values from a method without using ref or out parameters.Tuples are used to pass multiple values to a method through a single parameter. Tuples can also be nested togetherExamplePassig Tuples as a Parameterclass Program{ static void DisplayTupleValues(Tuple dummy){ ... Read More
Nizamuddin Siddiqui
2K+ Views
In C# 5.0 and before to give an value to the Auto Property we have to do in the constructorThe constructor will be automatically called when class is instantiated and the value will be setAfter C#5.0 a new way to give a value to auto property has come which is ... Read More
Nizamuddin Siddiqui
2K+ Views
In c# multiple values can be returned using the below approaches −Reference parametersOutput parametersReturning an ArrayReturning a TupleReference parametersExampleclass Program{ static int ReturnMultipleValuesUsingRef(int firstNumber, ref int secondNumber){ secondNumber = 20; return firstNumber; } static void Main(){ int a ... Read More
Nizamuddin Siddiqui
719 Views
Interface methods are contract with the outside world which specifies that class implementing this interface does a certain set of things.Interface members are always public because the purpose of an interface is to enable other types to access a class or struct.Interfaces can have access specifiers like protected or internal ... Read More
Nizamuddin Siddiqui
1K+ Views
The main difference is StringBuilder is Mutable whereas String is Immutable.String is immutable, Immutable means if you create string object then you cannot modify it and It always create new object of string type in memory.On the other hand, StringBuilder is mutable. Means, if we create a string builder object ... Read More