Tuesday, 5 April 2011

C#.net Quens

What is C#.NET?
--C#.NET is the most powerfull programming language among all programing languages of .NET because C#.NET will contain all features of C++ ,VB6.0 ,JAVA and additional features


C#.NET== C++  + VB6.0  +  JAVA  +  Additional features


list of Applications that can be created usig Visual studio.NET ?
--console applictaions
   class lib
   windows forms appplications
   windows control library
   windows services
   WCF Applications
   WPF Applications
    WCF Services
    Web Services


Console Applications:  CA Basic programming for C#.NET completly
                                    CA do not provide any GUI facilities
                                    CA completly work with CUI mode


GUI--Graphical User Interface
CUI--Charecter User Interface


Intellisense:  An Intellisence is the small window can be consider as a small brain which contain all the namespace names , Class names & predefined functions available


ShortCut key is CTRL+SPACEBAR


Console class:
        console is a class available in system namespace.this class will contain various functions which are helpfull to write the code to work with i/p o/p operations.


How many types of Explicit typecasting?
--C#.NET supports $ types of Explicit typeCasting
    Type Casting
     Boxing And Unboxing
      C++ Style of typeCasting
      parsing


What is Array?
--An array is a user defined data type Used to store group of values with the same name.
SYNTAX: Datype[ ] Arrayname = new Datatype [Size] ;


Methods of Array Object?
--Copy To( Arrayname , int index)
   Min( )
   Max( )
   Sum( )
 Properties Of Array Object?
-- Length  Rank


Jagged arrays are used in Gamming programming in Realtime


Boxing supports 2types:
      Implicit Boxing
       Explicit Boxing
Boxing is 20 times costlier than normal Intialization


UnBoxing is 4 times Costlier than normal Intialization


OBJECT ORIENTED PROGRAMMING


CLASS: A class is the collection of things that contain common similarities or features.


OBJECT: An Object is used to represent a class without object we can't represent the class
An object is known as an instance of the class


Features of OOP:
-- Abstraction
   Encapsulation
    Polymorphysm
    Inheritance


Abstraction : Abstarction is the process of hiding the implementation but proving the service or results...


Encapsulation: Encapsulation is the process of binding the member variable of class along with member function.


Polymorphsm:  This word is derived from Greek. Poly means many, morph means behaviour (or) forms
i.e.., same function or operator will show diff behaviour when no.of arguments & datatypes arguements are changed..

Inheritance: Inheritance is the process of creating a new class from an existing class..


kinds of Inheritances:
    single inheritence
     muntli level inheritence
      multiple inheritence
        hybrid inheritence
         hyrarchical inheritence


Access Modifiers like:
     private
     protected
     internal ( default)
     procted internal
     public


In C#.NET a class can contain 7 Members
---Datafields
    Functions
    Constructors
    Destructors
    Properties
    Indexes
    Events


DATA FIELD: Data fields are responcible for to store the data related to the class
syntax:AccessModifier Datatype DataFieldName
ex:  public int empid;


METHOD:A method is a reusable pease of code used to perform same task..
  1) procedure
  2) Functions


Procedure: A procedure is a method which will never return any value to the calling place..
Function: A function is method which always will return a single value to the calling place..


constructors?
--a constructor is a member method of class which is invoked automatically when an object to the class is created.
--a constructor should be same as class name
--a constructor does not have any return type even void also


types of constructor?
--instance constructor
    1) default constructor,
     there are two types
--user defined default constructor and system defined default constructor
     2)parameterized,
    3) copy and
    4) private.


--non instance constructor
1)static constructor


how many constructor can class contain?
-any number of


where static constructor are used?
--Static constructors are also useful when creating wrapper classes for unmanaged code, when the constructor can call the LoadLibrary method.


what is the use of SU24?
--SU24 is being used to display the authorization checks(whether authorization check is there or not) for the Transaction Codes.


What is signature?
-- The signature of a method must be unique in the class in which the method is declared..


Function Overloading :
        A function will be overloading in two situations..
              1) when data types of the argument are changed
               2) when number of argument are changed
--providing new implementation toa function with different signature is known as function overloading..

Function Overriding?
--Providing New implementation to a function with same name and same signature is known as Funtion Overriding


Operator overloading ?
--every operator has some pre-defined work given by the designers if we assign additional work apart from the existing work to any operator then we say operator is overloaded..


List of Operators that can not be overloaded?
--  member selection ( . )
-- pointer to  menber selection ( .* )
-- scope resolution ( :: )
-- Conditional  ( ?: )
-- preprocessor convert to string ( # )
-- preprocessor concatenate ( ## )


ACCESS MODIFIERS:
--Private: private members are accessible only with in the same class.
--protected: protected members are accessible with in the same class and also in the derived class, derived class might be in same assembly or in diff assembly..
--internal:Internal members are accessible in any class with in the same assembly but nor accessible in any class out side the assembly
--proctedinternal:this is combination of both procted and internal i.e.., protected internal members are accessible in any class with in the same assembly.and also from the derived classes out side the assembly, but not accessible from the Non-Derived classes out side the assembly..
--public: public members are accesible in any class in any assembly.

Abstract Function:
     A functioon which contains only Declaration /Signature and doesn.t contain implementation /body /defination is known as Abstract Function

Is Abstract function can be terminated?
--abstract fun can be terminated

What is Abstract Class?
--A class which contains one or more abstract functions is known as Abstract class..

By Default Abstract class Functions are not treated as PUBLIC AND ABSTRACT..

What is INTERFACE?
--An Interface is a contract b/w itself and derived class

3 comments: