Академический Документы
Профессиональный Документы
Культура Документы
1. What is .NET?
a. A technology from Microsoft or platform based on .NET Framework
2. What is DLL Hell?
3. Why .NET?
a. Multiple language support
b. Cross-Language Integration or Interoperability among the
languages
c. All languages get compiled into a common format called as
Intermediate Language (IL)
d. Single software required to run applications written any .NET based
language called as CLR (Common Language Runtime)
e. Single IDE for any kind of development
f. Different kind of application development using same language
i. Console Application
ii. Web Application
iii. Mobile Applications
iv. Web Service
v. Class Library
4. What is Framework?
a. A software which provides a set of libraries, configuration files and
some tools
b. .NET Framework, Mono Framework
c. Struts, Hibernate, Spring etc.
5. What is .NET Framework?
a. A framework from Microsoft which runs only on MS Windows and
supports all languages under .NET
6. What is Mono Framework?
a. Implementation of .NET Framework specification for any operating
system using C# as language as open source by Novell
7. What are different versions of .NET Framework?
a. 1.0
b. 1.1
c. 2.0
d. 3.0
e. 3.5
f. 4.0
8. What is Visual Studio?
a. An IDE from Microsoft
b. Visual Studio 2001
c. Visual Studio 2003
d. Visual Studio 2005
e. Visual Studio 2008
f. Visual Studio 2010
9. What are different versions of Visual Studio?
a. Express Edition
b. Standard
c. Professional
d. Team Suite
10.What is IL or MSIL or CIL?
a. There is one point to be made regarding the abbreviation IL. During
the development of .NET, the official term for IL was Microsoft
intermediate language (MSIL). However with the final release of .NET,
the term was changed to Common Intermediate Language (CIL). Thus,
as you read the .NET literature, understand that IL, MSIL, and CIL are
all describing the same exact entity. In keeping with the current
terminology, I will use the abbreviation CIL throughout this text.
11.What is CLR?
a. The runtime layer is properly referred to as the Common Language
Runtime, or CLR. The primary role of the CLR is to locate, load, and
manage .NET types on your behalf. The CLR also takes care of a
number of low-level details such as memory management; creating
application domains, threads, and object context boundaries; and
performing various security checks
12.What is CTS?
a. Another building block of the .NET platform is the Common Type
System, or CTS. The CTS specification fully describes all possible data
types and programming constructs supported by the runtime, specifies
how these entities can interact with each other, and details how they
are represented in the .NET metadata format.
i. System.Int32 C# (int), VB (Integer)
13.What is CLS?
a. Understand that a given .NET-aware language might not support each
and every feature defined by the CTS. The Common Language
Specification (CLS) is a related specification that defines a subset of
Figure 2: The CLR, CTS, CLS, and base class library relationship
17.What is ILDASM?
a. Intermediate Language De-Assembler
b. It show the CIL Code, Metadata and Manifest Information inside an
assembly
c. Using Ctrl+M to show the Meta Data
18.Can we see the actual code within an assembly?
a. Yes, using some tools like .NET Reflector
b. http://reflector.red-gate.com/download.aspx
19.What is Interoperability or Cross Language Integration?
20.What is the URL from where we can know about the languages under .NET?
a. http://www.dotnetlanguages.net
21.Why C# is most popular language?
a. Due to the fact that C# is a hybrid of numerous languages, the result is
a product that is as syntactically cleanif not cleanerthan Java, is
about as simple as VB6, and provides just about as much power and
flexibility as C++ (without the associated ugly bits). Here is a partial
list of core C# features that are found in all versions of the language:
i. No pointers required! C# programs typically have no need for
direct pointer manipulation
ii. Automatic memory management through garbage collection.
Given this, C# does not support a delete keyword.
iii. Formal syntactic constructs for classes, interfaces, structures,
enumerations, and delegates.
iv. The C++-like ability to overload operators for a custom type,
without the complexity
v. Support for attribute-based programming. This brand of
development allows you to annotate types and their members to
further qualify their behavior.
b. With the release of .NET 2.0 (circa 2005), the C# programming
language was updated to support numerous new bells and whistles,
most notably the following:
i. The ability to build generic types and generic members. Using
generics, you are able to build very efficient and type-safe code
that defines numerous placeholders specified at the time you
interact with the generic item.
ii. Support for anonymous methods, which allow you to supply an
inline function anywhere a delegate type is required.
iii.
Numerous simplifications to the delegate/event model,
including covariance, contravariance, and method group
conversion.
iv. The ability to define a single type across multiple code files,
using the partial keyword.
c. As you might guess, .NET 3.5 adds even more functionality to the C#
programming language (C# 2008, to be exact), including the following
features:
i. Support for strongly typed queries (LINQ, or Language
Integrated Query) used to interact with various forms of data
ii. Support for anonymous types, which allow you to model the
shape of a type rather than its behavior
iii. The ability to extend the functionality of an existing type using
extension methods
iv.
Inclusion of a lambda operator (=>), which even further
simplifies working with .NET delegate types
v. A new object initialization syntax, which allows you to set
property values at the time of object creation
24.What is a namespace?
25.What are different usages of @?
a. To allow to use a keyword as identifier
i. int @float;
ii. Neutralize the meaning of Escape Character
iii. With parameters in SQL Server
iv. Creating pre-formatted strings
26.What is an assembly?
a. A file compiled from any .NET based language contains intermediate
language and meta data. Such file is called as assembly. An assembly
can be in the form of .exe or .dll
b. When a *.dll or an *.exe has been created using a .NET-aware compiler,
the resulting module is bundled into an assembly.
c. An assembly contains CIL code, which is conceptually similar to Java
bytecode in that it is not compiled to platform-specific instructions by
the .NET runtime.
d. In addition to CIL instructions, assemblies also contain metadata that
describes in vivid detail the characteristics of every type living within
the binary.
e. Finally, in addition to CIL and type metadata, assemblies themselves
are also described using metadata, which is officially termed a
manifest. The manifest contains information about the current version
of the assembly, culture information (used for localizing string and
image resources), and a list of all externally referenced assemblies that
are required for proper execution.
Console.WriteLine();
Console.ReadLine();
// Return an arbitrary error code.
return -1;
}
@echo off
rem A batch file for SimpleCSharpApp.exe
rem which captures the app's return value.
SimpleCSharpApp
@if "%ERRORLEVEL%" == "0" goto success
:fail
echo This application has failed!
echo return value = %ERRORLEVEL%
goto end
:success
echo This application has succeeded!
echo return value = %ERRORLEVEL%
goto end
:end
echo All Done.
33.How to use the command line arguments at command prompt and from
visual studio?
a. We can also get the command line input using following method
i. string[] theArgs = System.Environment.GetCommandLineArgs();
34.What else we can do with Environment class?
a. It provides additional properties to give information about the current
operating system
foreach (string drive in Environment.GetLogicalDrives())
Console.WriteLine("Drive: {0}", drive);
Console.WriteLine("OS: {0}", Environment.OSVersion);
Console.WriteLine("Number of processors:
{0}",Environment.ProcessorCount);
Console.WriteLine(".NET Version: {0}",Environment.Version);
35.What is OOPs?
36.What is class?
37.What is object?
38.What is reference?
39.What are constructor and destructors?
40.Components of a class
a. Fields
i. Variables
ii. Constants
iii. Read only
b. Methods
c. Properties
d. Indexer
e. Delegates
41.Types of Members inside a class
a. Static
b. Non-Static
42.Types of Classes
a. Concrete class
b. Abstract class
c. Sealed class
43.Types of methods
a. Concreate
b. Abstract
c. Sealed
44.What are virtual methods?
45.What are conditions to override a method?
a. The method must be abstract or virtual
b. Use override keyword with virtual and also with abstract method if
allowing to override further
46.What keyword is used for hiding?
a. new keyword
47.What is the difference between method hiding and overriding?
a. Overriding is required if runtime polymorphism is to be implemented
48.What are interfaces and what are usages of interfaces?
49.Exception Handling
a. try
b. catch
c. finally
d. throw
50.What ADO.NET?
a. Providers
i. Odbc
ii. OleDb
iii. SqlClient
iv. OracleClient
b. Category of classes
i. Connection
ii. Command
iii. Adapter
iv. DataReader
v. Parameter
c. DataTable
d. DataSet
e. DataView
51.What is MVC (Model-View-Controller) Architecture?
a. It helps in reducing the efforts when different views are used
b. Sample
i. Create a project to manage data for students
1. rollno
2. name
3. course
ii. Views: Windows, Web Based
iii. Back-ends : SQL Server, Oracle
iv. OR-Mapping
namespace Mapping
{
public class Student
{
public Student()
{
}
public Student(int rollno, string name, string course)
{
this.RollNo = rollno;
this.Name = name;
this.Course = course;
}
public int RollNo
{
get;
set;
}
public string Name
{
get;
set;
}
public string Course
{
}
}
set;
get;