Casting Restrictions ???
We all know that the runtime can detect the actual type of a System.Object instance. The primitive data types provided by the runtime are compatible with one another for casting (assuming that we do …
Read more →Blog posts on tech, engineering, and more.
We all know that the runtime can detect the actual type of a System.Object instance. The primitive data types provided by the runtime are compatible with one another for casting (assuming that we do …
Read more →Let us take a look at the following piece of code:- public void Operate(IList iList2) { iList2 = new List(); iList2.Add(1); iList2.Add(2); iList2.Add(3); } public static void Main() { IList iList= new …
Read more →Extension Methods is an excellent feature in C# 3.0. It is a mechanism by which new methods can be exposed from an existing type (interface or class) without directly adding the method to the type. …
Read more →Guess the output of the following program:- class SomeClass : IDisposable { public SomeClass() { Trace.WriteLine("SomeClass - Attempting instance creation"); throw new Exception("Ohh !!! …
Read more →When I started developing my module, I had an interface IParamCountBasedAlgo declared as a nested type in a class AlgorithmOneExecutor, declared as follows:- namespace DataStructuresAndAlgo { partial …
Read more →