Sunteți pe pagina 1din 7

1 Find the fifth highest salary in Salary Table.

SELECT MIN(Salary) AS Expr1 FROM tblEmployee


WHERE (empid IN (SELECT DISTINCT TOP 5 empid FROM tblSalary ORDER BY
Salary))
2 What is Left Outer Join, Right Outer Join and Full Outer Join.
LEFT OUTER JOIN - This returns all the matching rows and the unmatched rows of the
left table of the SQL code.

RIGHT OUTER JOIN - This returns all the matching rows and the unmatched rows of the
right table of the SQL.

FULL OUTER JOIN - This returns all the matching and unmatched rows from both the
tables.
3 How you blank many controls(like textbox,checkbox,combobox etc) in C#.
foreach ( objectcontrol in form1)
{

if ( typeof Objectcontrol is TextBox)

Objectcontrol.text = "";
}elseif ( typeof objectcontrol is checkbox)
{

objectcontorl.checked = false;
}

}
4. Define co-related query.

5. Difference between Delete and Truncate command in SQL.


You can delete all the data in a table by using the TRUNCATE command (you can also
achieve this with a DELETE command but it is not as efficient due to the ROLLBACK
memory usage). TRUNCATE flushes the table of data but leaves the structure and
constraints intact. You can add a REUSE STORAGE option which tells the table to hold
onto the memory it used to store the rows (but I can't think of any reason why you would
want to do this).
6 What is three type of comment in C# program?
Single line, multiple line and document line.
Single line start form anywhere on a line with two forward slashs (//).
Multiple comment start with forward slash followed by an asterisk (/*) and end with
asterisk followed by slash .
Document comment start with three forward slashes(///).
7 What is CLR?
It provide a environment in which program are executed, it activate object, perform
security check on them, lay them out in the memory, execute them and garbage collect
them. CTS ( Common Type System ) is the part of CLR.
8 What is CLS ( Common Language Specification )?
It define a set of feature that all .net compatible languages should support.
9 What are the core technologies in .NET plateform?
.NET framework, .NET enterprise servers, Net building block services and Visual Stdio
.net
10 "What are the Difference between SQL 7.0 and SQL server 2000?
Bigint, Variant, Table, XML Support, Instead of Trigger.
11 What are the difference between Structure and Class?
The primary difference is that a structure is value data type and class is the reference data
type.
Structure don't have default constructur or destructors.
In Structure all variable and method is public where as in class it is private by default.
Structure does not have inheritance.
12 How many Catch Statement are associated with single try statement?
A try statement have zero or more catch statement, There is no limit to the number of
catch statement.
13 How is a base class method is Hidden?
Hiding a base class method by declaring a method in derived class with keyword new.
14 What Command is used to implement properties in C#?
get and set properties.
15 What is Console and System a Class, a Data Member, a routine , a namespace and a type.
Console is a class in System Namespace and System is a Namespace.
16 How many values can be returned from a method in C#?
Only one value can be returned from method, however you can use ref or out variable to
change more than one value in called method.
17 How you declare a output variable in Stored Procedure?
@varialename VariableType Output
18 What is Magic Table in SQL.
INSERT and DELETE table popularly known as Magic Table.
19 Can Primary key is a Foreign Key on the same table?
Yes, Let us consider there is employ Table ( empid, empName, empManagerid). In this
table manager is also be an employ.
20 Can we change the dimension of Array at run time like Array1[3,4]?
Yes, We can change only the first position of array dimension.
21 What keyword is used to accept a variable number of parameter in a method?
params keyword is used.
22 How to exit form Console Application.?
int exitValue = 0;
Environment.Exit(exitValue);

1. How to restore backup database into SQL server 2000?


RESTORE FILELISTONLY
FROM DISK = 'c:\BackDatabaseName'
RESTORE DATABASE TestDB
FROM DISK = 'c:\BackDatabaseName'
WITH MOVE 'BackDatabaseNameh_data' TO 'c:\BackDatabaseName_data.mdf',
MOVE 'BackDatabaseName_log' TO 'c:\BackDatabaseName_log.ldf'
GO
2. What Is an Object?
An object is merely a collection of related information and functionality.
Or
An object is composed of the data that describes the object and the operations that can be
performed on the object
3. What is Assemblies?
In the .NET Runtime, the mechanism of packaging is the assembly. When code is compiled by
one of the .NET compilers, it is converted to an intermediate form known as “IL”. The assembly
contains all the IL, metadata, and other files required for a package to run, in one complete
package. Each assembly contains a manifest that enumerates the files that are contained in the
assembly, controls what types and resources are exposed outside the assembly, and maps
references from those types and resources to the files that contain the types and resources. The
manifest also lists the other assemblies that an
assembly depends upon.

Assemblies are self-contained; there is enough information in the assembly for it to be self-
describing. When defining an assembly, the assembly can be contained in a single file or it can be
split amongst several files. Using several files will enable a scenario where sections of the
assembly are downloaded only as needed.

4. What is Namespaces and Using in .NET?


Namespaces in the .NET Runtime are used to organize classes and other types into a single
hierarchical structure. The proper use of namespaces will make classes easy to use and prevent
collisions with classes written by other authors.
Using is merely a shortcut that reduces the amount of typing that is required when referring to
elements.

5. What is Enums in C#?


Enumerators are used to declare a set of related constants—such as the colors that a control can
take—in a clear and type-safe manner. For example:
enum Colors
{
red,
green,
blue
}

6. What is Delegates?
Delegates are a type-safe, object-oriented implementation of function pointers and are used in
many situations where a component needs to call back to the component that is using it. They are
used most heavily as the basis for events, which allow a delegate to easily be registered for an
event.
7. What is Overloading?
Sometimes it may be useful to have two functions that do the same thing but take different
parameters.
8. What is Virtual Functions?
To make this work cleanly, object-oriented languages allow a function to be specified as virtual.
Virtual means that when a call to a member function is made, the compiler should look at the real
type of the object (not just the type of the reference), and call the appropriate function based on
that type.
9. Can constructors has parameter?
No, constructors is parameterless
10. What is Static Assembly and Dynamic Assembly.?
Static assemblies can include .NET Framework types (interfaces and classes) as well as
resources for the assembly (bitmaps, JPEG files, resource files, and so forth). Static assemblies
are stored on disk. Dynamic assemblies run directly from memory
and are not saved to disk before execution.
11. Functionality of Assembly in .NET.
It contains code that the common language runtime executes.

It is the unit at which security permissions are requested and granted.

It forms a type boundary. Every type's identity includes the name of the assembly in which it
resides.

It identifies the types and resources exposed outside the assembly as well as the otherassemblies
on which it depends.

It is the smallest unit that has version control. All types and resources in the same assembly are
versioned as a unit.

It is the deployment unit.

It is the unit at which side−by−side execution is supported.

12 Which Namespaces That Are Automatically Imported in ASP.NET


Namespace Description
System Contains fundamental classes and base classes that define commonly-used value and
reference data types, events and event handlers, interfaces, attributes, and processing exceptions.
System.Collections Contains interfaces and classes that define various collections of objects, such
as lists, queues, arrays, hash tables, and dictionaries.
System.IO Provides access to the File and Directory objects, which enable you to add, move,
change, create, or delete folders (directories) and files on the Web server.
System.Web Includes the HTTPRequest class that provides extensive information about the
current HTTP request, the HTTPResponse class that manages HTTP output to the client, and the
HTTPServerUtility object that provides access to server-side utilities and processes. System.Web
also includes classes for cookie manipulation, file transfer, exception information, and output
cache control.
System.Web.UI Contains the ASP.NET control classes.
System.Web.UI.HtmlControls Contains the HTML server controls.
System.Web.UI.WebControls Contains the Web controls.

13 Which namespaces are used for data access?


Namespace Description
System.Data Provides access to general data access services.
System.Data.OleDb Provides access to OLEDB -specific data access services.
System.Data.SQLClient Provides access to SQL Server data access services.

1) what is CLR?
2) WHAT IS CTS(COMMON TYPE SYSTEM)
3) WHAT IS ASSEBMLIES?
4) WHAT IS MANIFEST?
5) WHAT IS METADATA?
6) WHAT ARE THE TYPES OF ASSEMBLIES?
7) WHAT IS DELEGATES?.WHERE IT IS USED?.
8) DIFFERENCE BETWEEN ARRAYS AND STRUCTURES
9) WHAT IS INDEXERS?.Advantage of it over arrays?.
10) DIFFERENCE BETWEEN DATASET AND RECORDSET?.
11) DIFFERENCE BETWEEN ADO AND ADO.NET?.
12) WHAT IS CACHING?.WHAT ARE THE TYPES AVAILABLE?.
13) WHAT IS ABSTRACTION AND POLYMORPHISM?.
13) WHAT IS INTERFACES?.
14) DIFFERENCE BETWEEN INTERFACE AND ABSTRACT CLASS?.
15) WHAT IS OVERLOADING?.
16) WHAT IS OVERRIDING?.
17) WHAT DOES MEAN VIRTUAL KEY WORD?.
18) WHAT ARE THE CLASS ACCESS MODIFIERS?
19) DIFFERENCE BETWEEN DOCK AND ANCHOR PROPERTY?.
20) WHAT ARE THE VALIDATION CONTROLS AVAILABLE?.
21) DIFFERNCE BETWEEN asp.net SERVER CONTROLS AND HTML
srever CONTROLS?
22) WHAT IS BOXING AND UNBOXING?
23) WHAT ARE THE TYPES AVAILABLE?.
24) Name few of the integer datatypes and the length of
the same?.
25) what is web services?.where it is used?.
26) what is the diff between structures and enumeration?.
27) explain few of the namespaces in .net
28) what is namespaces?.
29) how u create shared assemblies?.
30) what is global assembly cache?.where it is used.
31) what is dataadapter?.what are the methods available?.
32) difference between datareader and dataset?.when
datareader and dataset used?.
33) what does mean validationsummary server control?where
it is used?.
34) what is the seqence of operation takes place when a
page is loaded?
35) difference between asp and asp.net?.
36) Name the validation control available in asp.net?.
37) what is MSIL?.
38) what is Jit compilers?.how many are available in
clr?.
39) How garbage collection operation by CLR HAPPENS/.
40) what is transaction?how to use .tell the properties
available.
41) what is native image cashe?.
41) what is serialization? and remoting/.
42) what is single call and singletone ?.
43) how xml files and be read and write using dataset?.
44) what are the rowversions available in dataset?.
45) can we set the target browser?.
46) what is tracing?.where it used.Explain few methods
available
47) How to set the debug mode?.
48) what is the property available to check if the page
posted or not?.
49) what is view state?.where it stored?.can we disable
it?.
50) what are the abstract class available under
system.xml namespace?.
51) Is it possible to use multipe inheritance in .net?.
52) Is it possible to use multipe interfaces in .net?.
53) can we use com Components in .net?.How ?.
54) can we use .net components in vb?.Explain how
55) what are the formmater class we are using in
serialization ?.
56) what are protocols used in .net remoting?.
57) what are the derived classes from xmlReader and
xmlWriter?.
58) can we perform transaction using web services?
59) Explain acid properties?.
60) what does mean static members in a class?.
61) what does it mean static functions in a class/?
62) what is constructor?.
63) what is destructor?.Does it deallocate the object?.
64) what is configuration?what are the configuraration
files available?.
65) can use use the session stored in one web server to
another?.Explanin how?.
66) how u handle the authentication ?Can we restrict the
particular users using this?.
67) what is managed and unmanaged code?.
68) what is Runtime Callable wrapper?.when it will
created?.
69) what is Com Callable wrapper?when it will created?.
70)suppose ur using the com components.Is it neccessary
for the com component during deployment?.
72) what are the server controls available in asp.net?.
73) How you consume the web services?.
74) what is reflection?.why it is used and what is the
namespace used for this?.
75)what are the methods available when ur using
reflection?.
76) what are the databound controls used in asp.net?.
77) what is the difference between repeater over datalist
and datagrid?.
78) what is rowstatefilter?.when it is used?.
79) How you deploy the assemblies?.
80) can we handle the error and redirect to some pages
using web.config?.
81) can we use win32api dlls in .net?.Explain how?.
82) can we declare a constructor and methods for a
stucture?
83) can we override a indexer?.
84) what is collection?.Explain the interfaces available
in a collection?.
85) can we use pointers in .net?.
86) what is called sealed classes?.can we derive sealed
classes?.
87) what is internal and protected keyword in c#?.
88) what does mean this in c#?.
89) when to use user control?.How to use?.
90) when to use html server control and asp.net server
controls?.
91) when is the use of activator.getobject and
activator.createinstance?.
92) Suppose i developed a host using http as a channel
for communication.
If i create a client using TCP IP as channel will it
work?
93) Is it neccessary for the client to provide a port
number while creating a object?.
94) difference b/w ASP and ASP.NET
100) What is difference between MetaData and Manifest

S-ar putea să vă placă și