Showing posts with label OOPS. Show all posts
Showing posts with label OOPS. Show all posts

OOPS PROGRAM IN C #


OOPS BASIC PROGRAM IN C# 


CLASS PROGRAM:



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

GENERIC CLASS,CONST,READ ONLY,ENUMERATION:

OOPS CONCEPT IN C#

Generic Class 



       Generic Class is a class whose instances can work on different types of data. Not only methods classes also can be created as generic classes.

Enumeration:

Static Class,Partial Class

Static Class:

Is a class whose members must be accessed without an instance of the class. 
In other words, the members of a static class must be accessed directly from (using the name of) the class, using the period operator
Is a class whose members must be created as static.
 In other words, you cannot add a non-static member to a static class: all members, except for constants, must be static


Difference Between Array and Arraylist

Difference Between Array and Array list


Array
ArrayList
They are fixed length.
They are resizable and variable length.
They are compiled strong type collection.
They are flexible and can accommodate any data types.
Because arrays are of fixed size and strong type collection
performance is faster.
In arraylist lots of boxing and unboxing are done there for its
performance is slower.

OOPS CONCEPTS IN C#

OOPS CONCEPTS AND INTERVIEW ANSWERS:



Class

      A Class is template definition.  Instance of methods, functions, variables and object.