A variable’s value must never be cached in C# because it may change outside of the scope of the program itself. Compiler optimizations that may cause problems if the variable changes “outside of its control” will be avoided. But in case if we need a field variable to be modified within the program by means […]
Get System IP Address Using C#
When it comes to networking, IP addresses are a must-have. While it may not be as critical from a C# perspective, we will look about the System as a result of this. There’s a lot of .NET namespace involved in here. We may only needed the IP address of a local device. So check the […]
C# Fixed Size Buffer
C# Fixed Array This article covers declaring a C++ style fixed-size structure was difficult in earlier versions of C#. But with advanced versions of C# fixed size array are possible. We are not discussing here about the array length or static or dynamic array which deals with an array capacity. In .NET normally arrays are reference […]
C# Version History | C# Evolution and Features
C# was developed in the year 2002 with the .NET Framework 1.0 and has since continued to develop with enhanced features and performance. C# is a general-purpose, contemporary, and object-oriented programming language. It was created by Microsoft as part of the.NET program and was authorized by the ECMA (European Computer Manufacturers Association) and the ISO […]
C# 3d array
In C# arrays can have multiple dimensions, arrays with more than one dimension. C# can support nearly 32 dimensions for multidimensional arrays. To declare a multidimensional array, use commas between the square brackets to delimit the array’s dimensions. Arrays can be classified according to their dimensions. The dimension of an array can be identified by counting […]
Collection Initializers in C# 3.0
C# Collection Initializers enable you to add items in the collection at the time of instantiation of the collection. Collection can be a List or Dictionary or any other available C# collection. Till C# 2.0, for creating a collection of Employees we normally do Assuming that there is an overloaded constructor for the Employee class.Here […]