User Name:

User Email:

This information will only be saved for the purposes of communicating with those who have provided this information voluntarily regarding our services.We will never sell your name or email address to anyone.
© 2022 - First Crazy Developer (Abhishek Kumar)

crazydeveloper Volatile keyword in C#

Volatile keyword is so important in the .Net Framework. Here we have also an important question: "Why we need this keyword and what happen if we don't use this keyword in our application?"

Volatile keyword comes into frame in .Net Framework to solve this problem. When we declare any variable with Volatile keyword  thread access this variable from main memory location, means they don't create copy of variable into their local memory. I am very glad that C# has ensured that any volatile read or write is also an atomic read or write.

Read more »
19 August 2015

crazydeveloper What is the use of Shadowing in C#

The concept of Shadowing is not a part of object oriented programming principle but this keyword is so important with classes & objects in C#. We must know the behaviour of Shadowing in C#.

In Shadowing the parent class element is completely replace by the child class in all terms. But here again the important question: What is the use of Shadowing?

Read more »
31 July 2015

crazydeveloper What is the use of "Covariance & Contravariance" in .Net Framework 4.0

Hello, and first of all a big thanks to all of you who provided comments and feedback on my previous post.  It encouraged me to work on this one!


I’d like to discuss a couple of integral concepts in C# 4.0, "Covariance and Contravariance". In order to understand the importance of these concepts and why they exist, we'll need to hop into our time machine and take a look at some code from .NET 3.5.

Read more »
22 July 2015

crazydeveloper What is the use of "checked" & "unchecked" keyword in C#

Importance of "checked" & "unchecked" keyword in C# :- 

Today we will discuss the use of "checked" and "unchecked" keywords and try to understand the importance of these keywords in C#.

We will start with some scenario then come to the point. Tell me what is the maximum value of int in C#?

  1. Console.WriteLine(int.MaxValue); // 2147483647

When we will execute the above code, we will get the maximum value of int in c#. The answer of maximum value of int in C# is "2147483647".

What happen when we try to store more than maximum value into int type variable?

Read more »
16 July 2015

crazydeveloper New features in C# 6 That we should know Part-1

Some days before I installed Visual Studio 2015 in my system. It introduces a completely new version of ASP.Net with include C# 6 language. In previous version they introduced lots of new concept like async and await in version 5, dynamic in version 4, LINQ in version 3 and so on. Now when we talk about C# 6, there are no any major feature changes came with this version, but there are a lots of syntactical improvements which will help you for better coding styles.

1. Primary Constructor &  Auto Implemented Properties Initializers

2. Expression Bodied members (Functions and Properties)

3. Getter-only auto-properties:

Read more »
10 July 2015

crazydeveloper What are Indexers in C# ?

In c# introduce new concept is Indexer. This is very useful for some situation. Let as discuss something about Indexer.

Indexers help us to simplify the way to access a collection for a class.

Summarizing in a sentence -  Indexers help to access contained collection  with in a class using a simplified  interface. It's a syntactic sugar.

  • Indexer Concept is object act as an array.
  • Indexer an object to be indexed in the same way as an array.
  • Indexer modifier can be private, public, protected or internal.
  • The return type can be any valid C# types.
  • Indexers in C# must have at least one parameter. Else the compiler will generate a compilation error.
Read more »
13 June 2015

crazydeveloper New features in C# - String interpolation

New features in C# - String interpolation

C# 6.0 introduce with new feature "String Interpolation", which give you more control to format your string in easily way.

Before this feature when we want to do this we used numbered placeholders like {0} in the format string, which must line up with separately supplied arguments:.......

Read more »
26 May 2015

crazydeveloper How to make sure security of user login password

Whenever we develop any application we have user account system. Every time we want to make them secure so they can't be hacked. Today we will understand this process

why we need that and how we can do that in details. Before going to start if I missed any part they your suggestions is most welcome.

As per secure logging system hashing technique is so popular to implement that, but there are lots of conflicting ideas or we can say misconceptions that how to do password hashing in right way. If we googling this on internet we found lots of information and that makes confused to implement in right way. So today we will discuss to implement not only right way but also why we need to implement that.

So the first question comes into our mind is that "What is Password Hashing?"

Read more »
23 May 2015

crazydeveloper What is the use of Var Keyword in c#

Var keyword is an implicit way of defining data type. C# 3.0 adds the interesting behavior of Declaring Local Variables Implicitly. In simple word var keyword look the data in right hand side then create appropriate data type.

var keyword define data type statically in compile time  not on runtime.The primary reason for its existence is the introduction of anonymous types in C#

Read more »
07 May 2015

crazydeveloper Boxing and Unboxing in C#

Boxing is the way to convert a value type to the type object or  to any interface type implemented  by this value type. Simply we can can say that convert value type to reference type. When boxing is in process CLR boxes a value type and wrap the value inside a System.Object. It is an implicit conversion.

Unboxing is the same opposite of  boxing, it converts the type object to the value type or we can say convert reference type to value type.Unboxing is an explicit conversion from the object type to the value type or an interface type to the value type.

Read more »
07 May 2015

Page 2 of 3

Become a Fan