ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
   
 
Categories  >>  Software  >>  Microsoft Related  >>  C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 WCF interview questions  WCF Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is type casting. Explain it with reference to classes.
 Question Submitted By :: Smartboy3k
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is type casting. Explain it with reference to classes.
Answer
# 1
Type casting means converting some type to some another
type.

for example, there are three classes:

class Employee
{
//Logic for this class

}

class Manager:Employee
{
//Logic for this class

}

class Clerk:Employee
{
//Logic for this class

}


class Program
{
static void Main(string [] args)
{
Employee e=new Employee();


//Type casting
Manager m=(Manager)e;

//Or
Clerk c=(Clerk)e;

}

}
 
Is This Answer Correct ?    13 Yes 2 No
Kiran Vaidya
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
Tell me something about Exceptions. What is the common exception class? HCL4
datagridview using updata in windows c#  1
how to handle errors in sqlserver  1
If we write a goto or a return statement in try and catch block will the finally block execute?  6
What are the two keywords used to pass a variable by reference in c#? IBM2
what is the purpose of Interfaces? HCL7
what is CLONE() method?  1
What are the two kinds of properties? Wipro10
How to call a function when a class implements 2 interfaces and function is present in both interfaces?  2
What is polymorphism? pl explain practically rather than theoretical?  3
What?s the difference between an interface and abstract class? Mind-Tree5
What are the important concepts in OOPS Fulcrum-Logic5
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com