
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 33676 Articles for Programming

4K+ Views
The Obsolete Attribute marks elements like classes, methods, properties, fields, delegates, and many others within our code as deprecated or obsolete. The attribute is read at compile time and it is used to generate a warning or an error to the developer.This attribute can help if we have ever wanted to make sure programmers use newer versions of methods. It also makes it easier when we are transitioning from older methods to newer ones. Marking an item as obsolete warns users that program elements will be removed in future versions of the code base.This attribute is found in the System ... Read More

5K+ Views
By default, all parameters of a method are required. A method that contains optional parameters does not force to pass arguments at calling time. It means we call method without passing the arguments.The optional parameter contains a default value in function definition. If we do not pass optional argument value at calling time, the default value is used.Thera are different ways to make a parameter optional.Using Default ValueExample Live Demousing System; namespace DemoApplication{ class Demo{ static void Main(string[] args){ OptionalMethodWithDefaultValue(5); //Value2 is not passed as it is optional ... Read More

19K+ Views
The main difference between List and IList in C# is that List is a class that represents a list of objects which can be accessed by index while IList is an interface that represents a collection of objects which can be accessed by index. The IList interface implemented from two interfaces and they are ICollection and IEnumerable.List and IList are used to denote a set of objects. They can store objects of integers, strings, etc. There are methods to insert, remove elements, search and sort elements of a List or IList. The major difference between List and IList is that ... Read More

3K+ Views
FinalizeFinalize() is called by the Garbage Collector before an object that is eligible for collection is reclaimed. Garbage collector will take the responsibility to deallocate the memory for the unreferenced object. The Garbage Collector calls this method at some point after there are no longer valid references to that object in memory.The framework does not guarantee that when this will happen, we can force for Garbage Collection but it will hurt performance of a program. Finalize() belongs to the Object class and it will be called by the runtime.Exampleusing System; namespace DemoApplication{ public class Demo{ ~Demo(){ ... Read More

362 Views
If a class implements two interfaces that contain a member with the same signature, then implementing that member on the class will cause both interfaces to use that member as their implementation.It's possible to implement an interface member explicitly—creating a class member that is only called through the interface, and is specific to that interfaceExampleinterface ICar{ void display(); } interface IBike{ void display(); } class ShowRoom : ICar, IBike{ void ICar.display(){ throw new NotImplementedException(); } void IBike.display(){ throw new NotImplementedException(); } } class Program{ static void Main(){ Console.ReadKey(); } }

635 Views
UnionUnion combines multiple collections into a single collection and returns a resultant collection with unique elementsIntersectIntersect returns sequence elements which are common in both the input sequencesExceptExcept returns sequence elements from the first input sequence that are not present in the second input sequenceExampleclass Program{ static void Main(){ int[] count1 = { 1, 2, 3, 4 }; int[] count2 = { 2, 4, 7 }; var resultUnion = count1.Union(count2); var resultIntersect = count1.Intersect(count2); var resultExcept = count1.Except(count2); System.Console.WriteLine("Union"); ... Read More

258 Views
Build solutionThis will perform an incremental build. In other words it will only build code files which have changed.If they have not changed those files will not be touched. Compiles code files (DLL and EXE) which are changed.Rebuild solutionThis will delete all currently compiled files (i.e., exe and DLLs) and will build everything from scratch,Irrespective of if there is code change in the file or not.Clean solutionThis menu will delete all compiled files (i.e., EXE’s and DLL’s) from the bin/obj directory.Rebuild = Clean + Build

1K+ Views
Make use of this keyword in c# to call one constructor from another constructor To call a constructor which is present in parent class make use of base keywordExampleTo call a constructor which is present in another class make use of base keywordclass DemoBase{ public DemoBase(int firstNumber, int secondNumber, int thirdNumber){ System.Console.WriteLine("Base class Constructor"); System.Console.WriteLine($"{firstNumber} {secondNumber} {thirdNumber}"); } } class Demo : DemoBase{ public Demo(int firstNumber, int secondNumber, int thirdNumber) : base(firstNumber, secondNumber, thirdNumber){ System.Console.WriteLine("Derived class Constructor"); System.Console.WriteLine($"{firstNumber} {secondNumber} {thirdNumber}"); } } class Program{ ... Read More

460 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 symbol(~)Destructors (~) cannot be defined in Structs.Destructor cannot be called. They are invoked automatically.Destructor implicitly calls Finalize on the base class of object.Exampleclass Demo{ ~Demo(){ //Finalizer // cleanup statements... } } class Program{ static void Main(){ Console.ReadLine(); } }The finalizer ... Read More

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 { get; set; } public static ListGetAllContents(){ List listContents = new List{ new Demo{ Name = "Cap", Contents = new List { "Nike", "Adidas" } }, ... Read More