Escolar Documentos
Profissional Documentos
Cultura Documentos
H2kInfosys
H2K Infosys provides online IT training and placement services worldwide.
www.H2KINFOSYS.com
USA- +1-(770)-777-1269, UK (020) 3371 7615
Training@H2KINFOSYS.com / H2KInfosys@gmail.com
DISCLAIMER
H2K Infosys, LLC (hereinafter H2K) acknowledges the proprietary rights of the trademarks and
products names of other companies mentioned in any of the training material including but not
limited to the handouts, written material, videos, power point presentations, etc. All such training
materials are provided to H2K students for learning purposes only. H2K students shall not use such
materials for their private gain nor can they sell any such materials to a third party. Some of the
examples provided in any such training materials may not be owned by H2K and as such H2K does
not claim any proprietary rights for the same. H2K does not guarantee nor is it responsible for such
products and projects. H2K acknowledges that any such information or product that has been
lawfully received from third party source is free from restriction and without any breach or
violation of law whatsoever.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: Part of assembly which contains assembly meta data that describes the assembly
itself is known as manifest. Assembly manifest contain Assembly Name ,Version
Number,Culture, Strong name, List of files inside the assembly and Reference
information
11.What are different types of Assembly?
The two types of Assemblies are Shared and Private.
12.What is Private Assembly ?
Ans: Private Assemblies are intended to be used by the program for which its made
for. This is because application will only load private assemblies that are located in
the same folder or in a sub folder that the main executable is loaded.
13.What is Shared Assembly ?
Ans: Shared Assemblies contain Common Libraries which are intended to be used by
multiple applications. While making shared assemblies, Name Collisions and
Overwriting existing Assemblies need to be taken care. Name Collisions can be taken
care by strong name. And global assembly cache can be used to avoid assembly
overwriting.
14.How to view a Assembly information ?
Ans: By using Ildasm.exe which is an MSIL Disassembler one can view
attributes, references to other modules and assemblies
15.Where is the assembly version information stored ?
Ans: In the Manifest.
16.What is NameSpace?
Ans: Namespace is a logical grouping of related classes and types. Every class should
have a NameSpace.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: Namespace:
1) Form the logical boundary for a Group of classes.
2) It is a Collection of names wherein each name is Unique.
3) Namespace must be specified in Project-Properties.
Assembly:
1) Assemblies are Self-Describing
2) It is an Output Unit. It is a unit of Deployment & a unit of versioning. Assemblies
contain MSIL code.
18.What is Global Assembly Cache (GAC) ?
Ans: While using shared assemblies, to avoid Assembly being overwritten by a
different version of the same assembly , shared assemblies are placed in a special
directory subtree in the file system, known as the global assembly cache (GAC).
Placing shared assemblies can be done by special .Net Utilities Only.
19.What is concept of strong names ?
Ans: While using shared assemblies, in order to avoid name collisions strong names
are used. Strong Names are based on private key cryptography , ie private assemblies
are simply given the same name as their main file name.
20.How to add and remove a assembly from GAC?
Ans: To install assembly in Cache use Gacutil. Goto "Visual Studio Command
Prompt" and type "gacutil -i
<assembly_name>", where (assembly_name) is the DLL name of the project. To
uninstall assembly, type gacutil u <assembly name> in Visual Studio Command
Prompt.
21.What is Reflection?
Ans: Reflection is used to dynamically load a class , create object and invoke methods
at runtime. It can also be used read its own meta data to find assemblies, modules and
type information at runtime.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: To create a strong named assembly and want this assembly to be used by
someone else, we partially build this assembly by provide a Public Key. We write this
Public Key in the AssemblyInfo.vb OR .cs file. We also add an attribute by the named
<Assembly:AssemblyDelaySignAttribute(true)> to the assembly info file. This makes
it sure that when we build the assembly, It would be containing the information only
about the public key before we deliver it to our client. This is a partial strong named
assembly that we have created, and hence it is called Delayed Assembly.
23.What are different type of JIT ?
Ans: Different Types of JIT are
1) Pre-JIT - Complies complete source code into native code at the time of
deployment
2) Econo-JIT - Complies methods that are called at runtime.
3) Normal-JIT - Complies methods that are called at runtime and get stored in cache.
Next time when the same method is called, it will be taken from cache.
24.What are Value types and Reference types ?
Ans: There are two types of data types in .Net, Value types and Reference
types.Value types are stored in stack part of the memory. Reference type are stored in
managed heap. Let have a look at the example for better understanding.
Int iCount = 0; \\ Value Type
int NewiCount = iCount; \\ Reference Type
24.What is concept of Boxing and Unboxing ?
Ans: Converting a value type to reference type is called Boxing. Converting a
reference type to value type is called Unboxing.
25.Whats difference between System exceptions and Application exceptions?
Ans: System exceptions are common exceptions thrown by the CLR of .Net
Framework. Application exceptions can be user defined exceptions thrown by the
application.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: CODE Access security is a security model that lets us grant or deny execution
permissions to an assembly according to its "properties," called evidence, such as its
strong name or publisher
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans:
Init() when the page is instantiated
Load() when the page is loaded into server memory
PreRender() the brief moment before the page is displayed to the user as HTML
Unload() when page finishes loading.
33.When during the page processing cycle is ViewState available?
Ans: After the Init() and before the Page_Load(), or OnLoad() for a control.
34.What namespace does the Web page belong in the .NET Framework class
hierarchy?
Ans: System.Web.UI.Page
35.Where do you store the information about the users locale?
Ans: System.Web.UI.Page.Culture
36.Whats the difference between Codebehind=MyCode.aspx.cs
andSrc=MyCode.aspx.cs?
Ans: CodeBehind is relevant to Visual Studio.NET only.
37.Whats a bubbled event?
Ans: When you have a complex control, like DataGrid, writing an event processing
routine for each object (cell, button, row, etc.) is quite tedious. The controls can
bubble up their eventhandlers, allowing the main DataGrid event handler to take care
of its constituents.
38.Suppose you want a certain ASP.NET function executed on MouseOver for a
certain button. Where do you add an event handler?
Ans: Add an OnMouseOver attribute to the button. Example:
btnSubmit.Attributes.Add(onmouseover,someClientCodeHere(););
39.What data types do the RangeValidator control support?
Ans: Integer, String, and Date.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
You can store many edits in a DataSet, and write them to the original data source in
a single operation.
Though the DataSet is universal, other objects in ADO.NET come in different
versions for different data sources.
45.What is the Global.asax used for?
Ans: The Global.asax (including the Global.asax.cs file) is used to implement
application and session level events.
46.What are the Application_Start and Session_Start subroutines used for?
Ans: This is where you can set the specific variables for the Application and Session
objects.
47.Can you explain what inheritance is and an example of when you might use
it?
Ans: When you want to inherit (use the functionality of) another class. Example:
With a base class named Employee, a Manager class could be derived from the
Employee base class.
48.Describe the difference between inline and code behind.
Ans: Inline code written along side the html in a page. Code-behind is code written in
a separate file and referenced by the .aspx page.
49.Explain what a diffgram is, and a good use for one?
Ans: The DiffGram is one of the two XML formats that you can use to render DataSet
object contents to XML. A good use is reading database data to an XML file to be
sent to a Web Service.
50.Whats MSIL, and why should my developers need an appreciation of it if at
all?
Ans: MSIL is the Microsoft Intermediate Language. All .NET compatible languages
will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile
the assembly on the installed computer.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: Every Page object (which your .aspx page is) has nine events, most of which you
will not have to worry about in your day to day dealings with ASP.NET. The three
that you will deal with the most are: Page_Init, Page_Load, Page_PreRender.
65.Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
Ans: System.Data.Common.DataAdapter.Fill(System.Data.DataSet);
If my DataAdapter is sqlDataAdapter and my DataSet is dsUsers then it is called this
way:
sqlDataAdapter.Fill(dsUsers);
66.Which template must you provide, in order to display data in a Repeater
control?
Ans: ItemTemplate
67.What is .Net Framework ?
Ans: The .NET framework is a programming framework from Microsoft. Developers
can use .Net Framework to develop applications, install and run the application on
Windows operating systems. Applications that can run on .Net Framework are
Console applications
Windows Forms applications
ASP.NET applications for web based applications
Windows services
Web services (XML, SOAP and WSDL)
Windows Presentation Foundation (WPF) applications
Windows Communication Foundation (WCF) applications
Windows Workflow Foundation (WF) for Workflow-enabled applications
68.What are the advantages of Dot Net?
Ans: Good Design
Object-Oriented Programming Using C# and .NET which are based on objectoriented Concepts.
Language Independence All the languages which are supported by .Net ( VB.NET,
C#, J#, and managed C++ ) are compiled in to common Intermediate Language (IL) .
So IL make sure that languages are interoperable.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Efficient Data Access ADO.NET provide fast and efficient way to access RDBMS,
file system etc
Code Sharing .To share code between applications, a new concept called assembly
is introduced. Assemblies supports versioning.
Improved Security
Support Dynamic Web Pages Using ASP.NET.
Support for Web Services
69.How can you provide an alternating color scheme in a Repeater control?
Ans: AlternatingItemTemplate Like the ItemTemplate element, but rendered for every
other
row (alternating items) in the Repeater control. You can specify a different
appearance
for the AlternatingItemTemplate element by setting its style properties.
70.What property must you set, and what method must you call in your code, in
order to bind the data from some data source to the Repeater control?
Ans: You must set the DataMember property which Gets or sets the specific table in
the DataSource to bind to the control and the DataBind method to bind data from a
source to a server control. This method is commonly used after retrieving a data set
through a database query.
71.What base class do all Web Forms inherit from?
Ans: System.Web.UI.Page
72. What method do you use to explicitly kill a users session?
Ans: The Abandon method destroys all the objects stored in a Session object and
releases their resources.
If you do not call the Abandon method explicitly, the server destroys these objects
when the session times out.
Syntax: Session.Abandon
73. How do you turn off cookies for one page in your site?
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: Use the Cookie.Discard Property which Gets or sets the discard flag set by the
server. When true, this
property instructs the client application not to save the Cookie on the users hard disk
when a session ends.
74. Which two properties are on every validation control?
Ans: ControlToValidate & ErrorMessage properties
75. How do you create a permanent cookie?
Ans: Setting the Expires property to MinValue means that the Cookie never expires.
76. Which method do you use to redirect the user to another page without
performing a round trip to the client?
Ans: Server.transfer()
77. What is the transport protocol you use to call a Web service?
Ans: SOAP. Transport Protocols: It is essential for the acceptance of Web Services
that they are based on established Internet infrastructure. This in fact imposes the
usage of of the HTTP, SMTP and FTP protocols based on the TCP/IP family of
transports. Messaging Protocol: The format of messages exchanged between Web
Services clients and Web Services should be vendor neutral and should not carry
details about the technology used to implement the service. Also, the message format
should allow for extensions and different bindings to specific transport protocols.
SOAP and ebXML Transport are specifications which fulfill these requirements. We
expect that the W3C XML Protocol Working Group defines a successor standard.
78. Define namespace?
Ans: The namespace are known as containers which will be used to organize the
hierarchical set of .Net classes.
79. What is a code group?
Ans: A code group is a set of assemblies that share a security context.
80. What are sealed classes in C#?
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: The sealed modifier is used to prevent derivation from a class. A compile-time
error occurs if a sealed class is specified as the base class of another class.
81. What is the difference between static and instance methods?
Ans: A method declared with a static modifier is a static method. A static method does
not operate on a specific instance and can only access static members.A method
declared without a static modifier is an instance method. An instance method operates
on a specific instance and can access both static and instance members. The instance
on which an instance method was invoked can be explicitly accessed as this. It is an
error to refer to this in a static method.
82. How many languages .NET is supporting now?
Ans: When .NET was introduced it came with several languages. VB.NET, C#,
COBOL and Perl, etc. 44 languages are supported.
83. How many .NET languages can a single .NET DLL contain?
Ans: Many.
84. What is metadata?
Ans: Metadata means data about the data i.e., machine-readable information about a
resource, . Such information might include details on content, format, size, or other
characteristics of a data source. In .NET, metadata includes type definitions, version
information, external assembly references, and other standardized information.
85. What is the difference between Custom Control and User Control?
Ans: Custom Controls are compiled code (Dlls), easier to use, difficult to create, and
can be placed in toolbox. Drag and Drop controls. Attributes can be set visually at
design time.
AUser Control is shared among the single application files.
86. What keyword is used to accept a variable number of parameter in a
method?
Ans: params keyword is used as to accept variable number of parameters.
87. What is boxing and unboxing?
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com
Ans: The Common Language Specification is a set of constructs and constraints that
serves as a guide for library writers and compiler writers. It allows libraries to be fully
usable from any language supporting the CLS, and for those languages to integrate
with each other. The Common Language Specification is a subset of the common type
system. The Common Language Specification is also important to application
developers who are writing code that will be used by other developers. When
developers design publicly accessible APIs following the rules of the CLS, those APIs
are easily used from all other programming languages that target the common
language runtime.
101.What is the Microsoft Intermediate Language (MSIL)?
Ans: MSIL is the CPU-independent instruction set into which .NET Framework
programs are compiled. It contains instructions for loading, storing, initializing, and
calling methods on objects.
Combined with metadata and the common type system, MSIL allows for true crosslanguage integration.
Prior to execution, MSIL is converted to machine code. It is not interpreted.
102.What is the use of GLOBAL.ASAX file?
Ans: It allows to execute ASP.NET application level events and setting applicationlevel variables.
103.Which class does the remote object has to inherit?
Ans: All remote objects should inherit from System.MarshalbyRefObject.
104.What is compile time and runtime polymorphism?
Ans: Method overloading is the example for compile time and method overriding is
the example for runtime polymorphism.
105.What is the default access modifier of a class and its members?
Ans: Default Access modifier of a class is internal and default access modifier of the
class members is private.
Job Oriented Instructor Led Face2Face True Live Online I.T. Training for Everyone Worldwide
www.H2kinfosys.com|| Training@H2KInfosys.com