Latest Event Updates

Interfaces in C#

Posted on Updated on

Image result for Interfaces in C#Interfaces in C#

In C#, interfaces are a way to attain run-time polymorphism. It is just like a class but has no implementation. An interface can contain methods, properties, methods or indexers. It is a syntactical contract that all class that all the classes that inherit the interface must follow. The interface defines the ‘what’ part while the deriving the classes define the ‘how’ part of the syntatical contract. interfaces have only the declarations and it is the responsibility of the deriving class to define the members. It provides the standard structure that the deriving class must follow. Read the rest of this entry »

Advertisements

Sealed Modifier

Posted on Updated on

Image result for C# dot netSealed Modifier

Sealed modifier when used with a class defines the inheritance level. When sealed is used with a class, they cannot be inherited by other classes. In other words, it prevents the derivation of the class. To make a class sealed, “sealed” keyword is used before the “class” keyword. If “sealed” modifier is used with a method, that method cannot be overloaded. Read the rest of this entry »

Abstract Access Modifier

Posted on Updated on

Image result for Abstract Access Modifier in dot netAbstract Access Modifier

The general meaning of abstract is “existing in thought or as an idea but not having a physical or concrete existence.” The abstract modifier is one of the important access modifier of object oriented language. This modifier shows that the the code on which we are implementing abstract has missing or incomplete implementation. These modifier can be used with classes, methods, properties, indexers and events. Read the rest of this entry »

Difference between Classes and Structs

Posted on

Image result for C#Difference between Classes and Structs

1) The base class for all the classes is System.Object while structs are derived from System.ValueType
2) The class are reference type where as struct are reference types. The reference type values are stored in heap memory while the value types are stored in stack. Read the rest of this entry »

Structure in C#

Posted on Updated on

Image result for Structure in C#Structure in C#

Structure is a value type data type in C#. With the help of structure a single variable can hold the values of different data types.To create a structure struct keyword is used.Structs can also contain constructors, constants, fields, methods, properties, indexers, operators, events and nested types.Structs cannot be declared as protected as they cann’t be inherited from another struct but they can implement an interface. Read the rest of this entry »

Access modifiers in C#

Posted on Updated on

Image result for C#Access modifiers in C#

Modifier modify the declarations of types and type members.Some of the modifiers used in C# are-
1) Access Modifiers
2) abstract
3) async
4) const
5) event Read the rest of this entry »

Inheritance in C#

Posted on Updated on

Image result for Inheritance in C#Inheritance in C#

Inheritance is one of the building blocks of any object oriented programming. The inheritance is the ability to create classes which inherits certain aspects from parent class. The entire .NET framework is built on this concept, with the “everything is an object”. All the classes in c# are inherited from System. Object class. Read the rest of this entry »