Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Sunday, September 27, 2015

Boxing and Unboxing

Boxing: Implicit conversion of a value type (int, char etc.) to a reference type (object), is known as Boxing. In boxing process, a value type is being allocated on the heap rather than the stack.
  1.          It converts a value type into a reference type.
  2.          Values are stored in the Stack first then moved to the heap.
  3.          Creates a container/box for holding the value.

Friday, May 1, 2015

C# - Generics

Generics are the most powerful feature of C# 2.0. Generics allow you to define type-safe data structures, without committing to actual data types. This results in a significant performance boost and higher quality code, because you get to reuse data processing algorithms without duplicating type-specific code. 
Generics provide a facility for creating data structures that are specialized to handle specific types when declaring a variable. Programmers define these parameterized types so that each variable of a particular generic type has the same internal algorithm but the types of data and method signatures can vary based on programmer preference.

Sunday, April 19, 2015

C# - Casting & Type Conversion

Type conversion is converting one type of data to another type. It is also known as Type Casting. In C#, type casting has two forms:

Implicit type conversion – These conversions are performed by C# in a type-safe manner. For example, are conversions from smaller to larger integral types and conversions from derived classes to base classes.(সফটওয়ারের দায়িত্তে)
Explicit type conversion – These conversions are done explicitly by users using the pre-defined functions. Explicit conversions require a cast operator.(নিজের দায়িত্তে)

Wednesday, April 15, 2015

C# - Attribute

Attribute is nothing more than a class that inherit from the base class Attribute.


Tuesday, April 14, 2015

C# - Operator Overloading

In an object oriented programming language like C#, operator overloading provides a much more natural way of implementing the operations on custom types.Suppose that we have a class created for Complex number and we want to perform all the arithmetic operations on this type. One way to do this is by having functions like Add, Subtract inside the class and have the functionality. Another way is to actually have the overloaded version of operators to act on this type.

C# - Interface

What an interface is?


In the real world, an interface means a medium to interact with something. To be precise, it's a point where two systems, subjects, organizations and so on meet and interact. There are a few rules for the interaction to be done. Suppose you are going for an interview of Programmer Profile. The interview is only possible if the interviewer and you speak the same language. Moreover, you and the interviewer have the same skill set of programming languages to discuss upon.

Monday, April 13, 2015

C# - Abstract Class

What is an Abstract Class?
An abstract class is a special kind of class that has no implementation. It cannot be instantiated. Its implementation logic is provided by the classes that derive from it. It can have both abstract as well as non-abstract methods. It is not compulsory to have only abstract methods in an abstract class. We can also have an abstract class with only non-abstract methods.

Tuesday, March 31, 2015

Microsoft Visual Studio Keyboard Shortcuts

Navigation Shortcuts
Ctrl + ]Moves the cursor to the matching brace in the source file
Ctrl + Hyphen (-)Moves cursor to its previous position
Ctrl + Shift + Hyphen (-)Moves cursor to the next browsed line of code
Shift + F7Switch between the Design and Source View of the document
Ctrl + TabDisplays the IDE Navigator with the current document selected. Allows you to navigate open documents. Also try Alt+W+2
Ctrl + Shift + FDisplays the ‘Find in Files’ tab of the ‘Find and Replace’ dialog box
Ctrl + IActivates Incremental Search by searching for the next occurrence of the input text. You can even use F3
Shift + F12Displays a list of all references for the symbol selected
Ctrl + /Moves focus to the Find/Command box