- 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
Samual Sam has Published 2492 Articles
Samual Sam
6K+ Views
C# exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero.C# exception handling is performed using the following keywords −try − A try block identifies a block of code for which particular exceptions is activated. It is ... Read More
Samual Sam
589 Views
To reduce concurrency issues in C#, use the volatile keyword. Let us seen an example.The following is how you use a volatile keyword for public variable −class Program { public volatile int a; public void Program(int _a) { i = _i; } }Let us ... Read More
Samual Sam
583 Views
Use the LINQ orderby keyword to sort a list in C#.In the below example, we have set the orderby for the elements −var myLen = from element in myList orderby element.Length select element;Let us see an example −Example Live Demousing System; using System.Collections.Generic; using System.Linq; class Demo { static ... Read More
Samual Sam
241 Views
Ternary operator is a Conditional operator in C#. It takes three arguments and evaluates a Boolean expression.For example −y = (z == 1) ? 100 : 180;Above, if the first operand evaluates to true (1), the second operand is evaluated. If the first operand evaluates to false (0), the third ... Read More
Samual Sam
250 Views
The IStructuralEquatable interface defines methods to support the comparison of objects for structural equality, which means that two objects are equal because they have equal values.It includes the following two methods −Sr.NoMethod & Description1Equals(Object, IEqualityComparer)The method determined whether an object is structurally equal to the current instance.2GetHashCode(IEqualityComparer)The methods a hash ... Read More
Samual Sam
151 Views
The Regex class is used for representing a regular expression. A regular expression is a pattern that could be matched against an input text.The following are the methods of Regex class −Sr.NoMethod & Description1public bool IsMatch(string input)Indicates whether the regular expression specified in the Regex constructor finds a match in ... Read More
Samual Sam
530 Views
Serialization converts objects into a byte stream and brings it to a form that it can be written on stream. This is done to save it to memory, file or database.Serialization can be performed as −Binary SerializationAll the members, even members that are read-only, are serialized.XML SerializationIt serializes the public ... Read More
Samual Sam
1K+ Views
Polymorphism can be static or dynamic. In static polymorphism, the response to a function is determined at the compile time. In dynamic polymorphism, it is decided at run-time.The linking of a function with an object during compile time is called early binding. It is also called static binding. C# provides ... Read More
Samual Sam
924 Views
In static polymorphism, the response to a function is determined at the compile time. In dynamic polymorphism, it is decided at run-time. Dynamic polymorphism is what we call late binding.Dynamic polymorphism is implemented by abstract classes and virtual functions. The following is an example showing an example of dynamic polymorphism ... Read More
Samual Sam
2K+ Views
To pass pointers as parameters to methods, refer the below steps −Firstly, crate a function swap with unsafe modifier.public unsafe void swap(int* p, int *q) { int temp = *p; *p = *q; *q = temp; }Now under static void main, add the value for the first ... Read More