Welcome to AspAdvice Sign in | Join | Help

From .NET Geek's Desk

Thoughts and Findings on .NET

Browse by Tags

All Tags » C#   (RSS)
Physical Layout of Data - StructLayout
This week I was taking a close look into various InterOp related stuff for a code review purpose.While doing so the way CLR controls the physical layout of a data structure in memory caught my attention.This is what I intend to discuss here. When we are Read More...
LINQ To XML Overview
In this post I will discuss about how we can use the concepts of LINQ in parsing an xml document using the classes provided in the System.Xml.Linq namespace.We can think of any xml document as a collection of nodes where a node can be element,attribute,processing Read More...
Anonymous Types and LINQ
Anonymous types, introduced in C# provides the facility to encapsulate a set of properties into a type without specifically naming the type in source code as shown below: var prod = new { Name="xyz",Price=12.00}; In this case compiler internally Read More...
Lambda Expressions
Before getting details of Lambda expressions let us quickly take a look into how we work with delegates and a named method since the days of .NET 1.1.Let us consider the following code sample //Delegate declaration public delegate void Test(string s); Read More...
String Interning in C#
We all know that string objects are immutable in C# i.e we can only create a new instance of the object we cannot alter or modify them.Let us take a quick look into the following lines of code: static void Main(string[] args) { string s1 = "sankarsan"; Read More...
Object Equality
In this post I will discuss about the very basic concepts related to object equality.Object equality can be of two types Value Equality - Two objects having same value for all the fields Reference Equality - Two instance variables pointing to same reference Read More...
Upcasting and Downcasting in C#
While reviewing code and discussing with developers I have seen in several occasions that people are not very clear or conscious about upcasting and downcasting.In this post I would like to note down the differences between the two. Upcasting means casting Read More...