ALLInterview.com :: Home Page KalAajKal.com
 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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 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
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
what are partial classes and their use?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what are partial classes and their use?
Answer
# 1
This is a feature of 2005,when we have large and unwildly 
classes instead of writing all the methods in same  program 
we will  divide the class into number of programs with the 
same class name,these classes are preceeded with partial 
keyword,when we compile all this partial classes only one 
dll with the same class name will be created. 


class with some 20 methods:
Example.cs
class classA{
m1( );
m2( );
.
.
.
m20( );
}

Apply partial concept:

Example1.cs
partial class classA
{
m1( );
m2( );
.
.
m8( );
}
example2.cs
partial class classA
{
m9( );
m10( );
.
.
m15( );
}
Example3.cs
partial class classA
{
m16( );
.
.
m20( );
}

if we compile Examle1.cs,Example2.cs,Example3.cs it will 
create only one dll 
 
Is This Answer Correct ?    3 Yes 1 No
Dasharatham
 
  Re: what are partial classes and their use?
Answer
# 2
“partial” keyword can be used to split a single class, 
interface, or struct into multiple, separate files in 
ASP.NET (using C# as the language). This permits multiple 
developers to works on these files, which can later be 
treated as a single unit by the compiler at the time of 
compilation and compiled into MSIL code. 

1.Partial classes can improve code readability and 
maintainability by providing a powerful way to extend the 
behavior of a class and attach functionality to it. 

2.The partial modifier can only appear immediately before 
the keywords class, struct, or interface.

3.Nested partial types are allowed in partial-type 
definitions.

4.Using partial classes helps to split your class 
definition into multiple physical files.

5.Note that the partial keyword applies to classes, 
structs, and interfaces, but not enums
 
Is This Answer Correct ?    1 Yes 4 No
Arunajyothi.m
 
 
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
In which interface the template of any control like Gridview would Initiate?  2
What was the difference between machine.config and web.config files Assurgent8
what is new debug tools in asp.net ?  1
what to magage the state manament in asp.net with respect to in_prock and out_prock Aviva1
Whats an assembly?  5
What?s the difference between Response.Write() andResponse.Output.Write()? Atos-Origin5
if you disable view state of a textbox will it maintain data during postbacks.if yes reason FactorH6
What is pre-init event in ASP.NET 2.0 page life cycle? Fulcrum-Logic1
Differences between session state and Application state?  2
How many types of validation controls are provided by ASP.NET?  4
What is a WebService and what is the underlying protocol used in it? Namespace?  1
What is the difference between a Stored procedure and function?  6
What is an Interface and What is an Abstract Class?  3
What combination of methods are used to improve the speed of the fill() method of the DataAdapter? a) BeginFillData() and EndFillData() b) StartFillData() and EndFillData() c) BeginLoadData() and EndLoadData() d) StartLoadData() and EndLoadData() Syntax-Softtech2
How do you do validations. Whether client-side or server-side validations are better.? Microsoft4
How many view state can be hold by a aspx page ? Intellevate3
what is CLR? PrimeLine3
What data type does the Range Validator control support?  3
State management in asp.net ? Accenture4
What does assemblyinfo.cs file consist of? Accenture1
 
For more ASP.NET 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 © 2007  ALLInterview.com.  All Rights Reserved.

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