Posts

Showing posts from January, 2019

Design Patterns in C#

Design patterns are solutions for software design problems we find repeatedly in real world application development.There are 23 design patterns which are grouped under 3 main categories. Creational design pattern Factory method Abstract factory Builder Prototype Singleton    2.Structural design pattern Adapter Bridge Composite Decorator Facade Flyweight Proxy    3.Behavioral design pattern Chain of responsibility Command Interpreter Interator Mediator Memento Observer State Strategy Visitor Template method

Class with Constructors in C#

Todays session we are gonna learn how to create a class with more then one constructors and what are the components of a class . Constructors are used to initialize the data members present in a class. using System; namespace Test {   class Animal   { private string _animalType; // data members or fields private int _animalCount;    // data members or fields public Animal()           // Default constructor { _animalType=""; _animalCount=0; } public Animal(string animalType,int animalCount)  // parameterized constructor { _animalType=animalType; _animalCount=animalCount;     } public string animalType              // Property { get{ return _animalType;}        // Accessor set{ _animalType=value;}          // Mutator } public int animalCount             ...

Data structures

Data structures                         A data structure is the way of storing and unifying data . Any type of object that stores data is called a data structure. There are 2 types of data structure. They are I.Primitive II. Non primitive I.Primitive              Primitive types are value types such as 1. Signed integer(sbyte,short,int,long) 2.Unsigned integer(byte,ushort,uint,ulong) 3.Unicode characters(char) 4.IEEE floating point(float,double) 5. High precision decimal (decimal) 6.Boolean(bool) 7.Nullable 8. String 9.Object II.Non primitive               Non primitive types are user defined types . Further it is divided in to 2 types. They are i)Linear ii)Non linear i)Linear         In linear da...