Beruflich Dokumente
Kultur Dokumente
Yes, this a free of cost website which provides dot net interview questions and their answers.
This site also provides a lots of other information required for a software developer. Just select
the category of Questions you want from right hand side. It has got a lot of material on dot
net interview questions, dot net faq and dot net questions.
Exactly... This site is the source of dot net faq that provides all typs of frequently asked
question on dot net and many supporting languages.
The question asked by you will go directly to one of our Software Engineer who is working
continuously in this field since many years. In short we want to explain that we have got a
number of experienced persons and number of dot net questions which is very helpful while
preparing for interview. So don't worry weather you are a B.Tech, MCA or any other you will
get the 100% accurate answers and you can clear any interview.
Now you can make your knowledge stronger and face any problem. In fact after studying this
website you can be the Master. So what are you waiting for... start grabbing your knowledge
ADO.NET
Question:-What is Concurrency and its types?
Answer: When two or more people try to update same type of data then Concurrency helps
how to handle this situation there are two types of concurrency:pessimistic and optiimistic.
Pessimistic:-When one user try to change the data with pessimistic concurrency a lock is
placed on the data so that another user cannot change that one after one another can change.
Optimistic:-In this if two user works on the same data and one change that data first then
second user cannot change that same data becasue the which he have using is allready
changed so he cannot do the change becasue change apply to another data that is changed by
first user.
if ds.Tables(0).Rows.Count= 0 then
'No record
else
'record found
dr= cmd.ExecuteReader(CommandBehavior.CloseConnection);
The associated connection will be closed automatically when the Close method of the
Datareader is called. This makes it all the more important to always remember to call Close on
your datareaders.
Question:-What are good ADO.NET object(s) to replace the ADO Recordset object?
Answer: There are alot...but the base once are SqlConnection, OleDbConnection, etc...
Question:-Can you explain the difference between an ADO.NET Dataset and an ADO
Recordset?
Answer:Valid answers are:
• A DataSet can represent an entire relational database in memory, complete with
tables, relations, and views.
• A DataSet is designed to work without any continuing connection to the original data
source.
• Data in a DataSet is bulk-loaded, rather than being loaded on demand.
• There's no concept of cursor types in a DataSet.
• DataSets have no current record pointer You can use For Each loops to move through
the data.
• 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.
ASSEMBLY
Question: What do u mean by Satellite Assemblies ?br /> Answer: The assemblies
which contains only culture information are known as satellite assemblies.This assembly is
used to get language specific resources for an application .
Question: How can you tell the application to look for assemblies at the locations
other than its own install ?
Answer: Use the directive in the XML .config file for a given application.
should do the trick. Or you can add additional search paths in the Properties box of the
deployed application.
Question: How do you specify a custom attribute for the entire assembly (rather
than for a class) ?
Answer: Global attributes must appear after any top-level using clauses and before the first
type or namespace declarations. An example of this is as follows:
using System;
[assembly : MyAttributeClass] class X {}
ASP.NET BASIC
Question: What is late binding ?
Answer: When code interacts with an object dynamically at runtime .because our code
literally doesnot care what type of object it is interacting and with the methods thats are
supported by object and with the methods thats are supported by object .The type of object is
not known by the IDE or compiler ,no Intellisense nor compile-time syntax checking is possible
but we get unprecedented flexibilty in exchange.if we enable strict type checking by using
option strict on at the top of our code modules ,then IDE and compiler will enforce early
binding behaviour .By default Late binding is done.
Use the View State property to save data in a hidden field on a page. Because ViewState
stores data on the page, it is limited to items that can be serialized. If you want to store more
complex items in View State, you must convert the items to and from a string.
Context.Handler object Use this object to retrieve public members of one Web form’s class
from a subsequently displayed Web form.
Query strings Use these strings to pass information between requests and responses as part
of the Web address. Query strings are visible to the user, so they should not contain secure
information such as passwords.
Cookies Use cookies to store small amounts of information on a client. Clients might refuse
cookies, so your code has to anticipate that possibility.
View state ASP.NET stores items added to a page’s ViewState property as hidden fields on
the page.
Session state Use Session state variables to store items that you want keep local to the
current session (single user).
Application state Use Application state variables to store items that you want be available to
all users of the application.
Programmers understand that they're responsible for releasing any memory that they allocate,
but they're not very good at actually doing it. In addition, functions that allocate memory as a
side effect abound in the Windows API and in the C runtime library. It's nearly impossible for a
programmer to know all of the rules. Even when the programmer follows the rules, a small
memory leak in a support library can cause big problems if called enough.
The .NET Framework solves the memory management problems by implementing a garbage
collector that can keep track of allocated memory references and release the memory when it
is no longer referenced. A large part of what makes this possible is the blazing speed of
today's processors. When you're running a 2 GHz machine, it's easy to spare a few cycles for
memory management. Not that the garbage collector takes a huge number of cycles--it's
incredibly efficient.
The garbage collector isn't perfect and it doesn't solve the problem of mis-managing other
scarce resources (file handles, for example), but it relieves programmers from having to worry
about a huge source of bugs that trips almost everybody up in other programming
environments.
On balance, automatic memory management is a huge win in almost every situation.
OOPS
Question: What Is OOPS ?
Answer: OOPs is an Object Oriented Programming language,which is the extension of
Procedure Oriented Programming language.OOPS reduce the code of the program because of
the extensive feature of Polymorphism. OOPS have many properties such as Data-
Hiding,Inheritence,Data Absraction,Data Encapsulation and many moreEverything in the world
is an object. The type of the object may vary. In OOPS, we get the power to create objects of
our own, as & when required.
COM - DCOM
Question:-Whats the relation between COM/DCOM ?
Answer: DCOM is an extended to COM that allows network-based component interaction.
Because COM only ability that processes can run on the same machine but in different address
spaces, the DCOM extension allows across a network. DCOM components can helpfull on
variety of platforms . we can also say that COM and DCOM is single technology that provides a
many services for component interaction, some specific tasks are component integration on a
single platform,component interaction across heterogeneous networks.COM and its DCOM
extensions are merged into a single runtime.
Question:-I can’t import the COM object that I have on my machine. Did you write
that object?
Answer:You can only import your own objects. If you need to use a COM component from
another developer, you should obtain a Primary Interop Assembly (PIA) from whoever
authored the original object.
Question:-How do you call unmanaged methods from your .NET code through
PInvoke?
Answer: Supply a DllImport attribute. Declare the methods in your .NET code as static
extern. Do not implement the methods as they are implemented in your unmanaged code,
you’re just providing declarations for method signatures.
Question:- Can you retrieve complex data types like structs from the PInvoke calls?
Answer: Yes, just make sure you re-declare that struct, so that managed code knows what to
do with it.
Question:-Suppose I call a COM object from a .NET applicaiton, but COM object
throws an error. What happens on the .NET end?
Answer: COM methods report errors by returning HRESULTs; .NET methods report them by
throwing exceptions. The runtime handles the transition between the two. Each exception
class in the .NET Framework maps to an HRESULT.
CSS
Question: What do u mean to CSS ?
Answer: Style sheets are a very powerful tool for the Web site developer. They give you the
chance to be completely consistent with the look and feel of your pages, while giving you
much more control over the layout and design than straight HTML ever did.
REMOTING
Question:-What is .NET Remoting ?
Answer: .NET Remoting is an enabler for application communication. It is a generic system
for different applications to use to communicate with one another. .NET objects are exposed to
remote processes, thus allowing interprocess communication. The applications can be located
on the same computer, different computers on the same network, or even computers across
separate networks.
Question:-What is Channels ?
Answer: Remote objects are accessed through Channels. Channels physically transport the
messages to and from remote objects. There are two existing channels TcpChannel and
HttpChannel. Their names give away the protocols that they use. In addition, the TcpChannel
or HttpChannel can be extended, or a new channel created if you determine the existing
channels do not meet your needs.
The .NET Remoting system, as an integral part of the .NET Framework, supports full .NET type
system fidelity. You can pass any object across the wire to a client. This is in contrast to
ASP.NET, which is limited to data types that can be expressed with WSDL and XSD.
Question:-What is Abstract ?
Answer: .NET Remoting provides a powerful and high performance way of working with
remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources
across the network without the overhead posed by SOAP based WebServices. .NET Remoting
is easier to use than Java's RMI, but definately more difficult than creating a WebService.
SQL SERVER
Question: What are the null values in SQL SERVER ?
Answer: Before understand the null values we have some overview about what the value is.
Value is the actual data stored in a particular field of particular record. But what is done when
there is no values in the field.That value is something like < null>.Nulls present missing
information. We can also called null propagation.
1) Entity integrity
2) Domain integrity
3) Referential integrity
4) User-defined integrity
Entity Integrity: Entity integrity defines a row as a unique entity for a particular table. Entity
integrity enforces the integrity of the identifier column(s) or the primary key of a table
(through indexes, UNIQUE constraints, PRIMARY KEY constraints, or IDENTITY properties).
Domain Integrity: Domain integrity is the validity of entries for a given column. You can
enforce domain integrity by restricting the type (through data types), the format (through
CHECK constraints and rules), or the range of possible values (through FOREIGN KEY
constraints, CHECK constraints, DEFAULT efinitions, NOT NULL definitions, and rules).
· Adding records to a related table if there is no associated record in the primary table.
· Changing values in a primary table that result in orphaned records in a related table.
· Deleting records from a primary table if there are matching related records.
For example, with the sales and titles tables in the pubs database, referential integrity is
based on the relationship between the foreign key (title_id) in the sales table and the primary
key (title_id) in the titles table.
User-Defined: Integrity User-defined integrity allows you to define specific business rules
that do not fall into one of the other integrity categories. All of the integrity categories support
user-defined integrity (all column- and table-level constraints in CREATE TABLE, stored
procedures, and triggers).
Question: SQL Server runs on which TCP/IP port and From where can you change
the default port?
Answer: SQL Server runs on port 1433 but we can also change it for better security and From
the network Utility TCP/IP properties -->Port number.both on client and the server.
Question: What is the use of DBCC commands?
Answer: DBCC stands for database consistency checker. We use these commands to check
the consistency of the databases, i.e., maintenance, validation task and status checks.DBCC
CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC
CHECKALLOC To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives
report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all
tables file group for any damage.
Question: What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
Answer: Having Clause is basically used only with the GROUP BY function in a query. WHERE
Clause is applied to each row before they are part of the GROUP BY function in a query.
Normalizing a logical database design involves using formal methods to separate the data into
multiple, related tables. A greater number of narrow tables (with fewer columns) is
characteristic of a normalized database. A few wide tables (with more columns) is
characteristic of an nonnomalized database. Reasonable normalization often improves
performance. When useful indexes are available, the Microsoft® SQL Server™ 2000 query
optimizer is efficient at selecting rapid, efficient joins between tables.
Sometimes the logical database design is already fixed and total redesign is not feasible. Even
then, however, it might be possible to normalize a large table selectively into several smaller
tables. If the database is accessed through stored procedures, this schema change could take
place without affecting applications. If not, it might be possible to create a view that hides the
schema change from the applications.
Question: Can you tell me the difference between DELETE &TRUNCATE commands?
Answer: Delete command removes the rows from a table based on the condition that we
provide with a WHERE clause. Truncate will actually remove all the rows from a table and
there will be no data in the table after we run the truncate command
VB.NET QUESTIONS
Question:-What is DataType conversion in VB.NET ?
Answer: Convert one variable type to another one is called datatype conversion we can also
caleed this casting in VB.NET some automatically conversion is also there.
Cbool CByte CChar Cdate CDec CDbl CInt CLng CObj CShort CSng CStr CType Asc.
WEB SERVICES
Question: Define Protocols that helps Web Services ?
Answer: From my point of view Web Services used three protocols for interacting with the
clients.Http-Post,Http-Get,SOAP.
Http-Post:-This is same as Http-Get but the diffrence is that in place of sending parameters
onto the URL information is send with HTTP request message with some extra information
which contains Parameters and their values.This Protocols is limited to sending name/value
pairs.
SOAP:-The only diffrence is that its relies on the XML as compares to Http-Get,Http-
Post.SOAP can send not only the name/value pairs but also some complex object also as for
example datatypes,class,objects.SOAP can also uses request/reponse model as Http-Get,Http-
post but it is not limited to Request/Response it can also send types of message.Because its
uses XML that is pure text so firewalls not created so much problem because its easily
converted in to HTML. .
Question: What is the standard you use to wrap up a call to a Web service ?
Answer: HTTP with SOAP.
Question: Is it possible to generate the source code for an ASP.NET Web service
from a WSDL ?
Answer: The Wsdl.exe tool (.NET Framework SDK) can be used to generate source code for
an ASP.NET web service with its WSDL link.
Example: wsdl /server http://api.google.com/GoogleSearch.wsdl.
Question: Can you give an example of when it would be appropriate to use a web
service as opposed to a non-serviced .NET component ?
Answer: When to Use Web Services:
(i)Communicating through a Firewall When building a distributed application with 100s/1000s
of users spread over multiple locations, there is always the problem of communicating
between client and server because of firewalls and proxy servers. Exposing your middle tier
components as Web Services and invoking the directly from a Windows UI is a very valid
option.
(iii)Business-to-Business Integration This is an enabler for B2B intergtation which allows one
to expose vital business processes to authorized supplier and customers. An example would be
exposing electronic ordering and invoicing, allowing customers to send you purchase orders
and suppliers to send you invoices electronically.
(iv)Software Reuse This takes place at multiple levels. Code Reuse at the Source code level or
binary componet-based resuse. The limiting factor here is that you can reuse the code but not
the data behind it. Webservice overcome this limitation. A scenario could be when you are
building an app that aggregates the functionality of serveral other Applicatons. Each of these
functions could be performed by individual apps, but there is value in perhaps combining the
the multiple apps to present a unifiend view in a Portal or Intranet.
XML - XHTML
Question:-What is XML ?
Answer: XML is the Extensible Markup Language. It improves the functionality of the Web by
letting you identify your information in a more accurate, flexible, and adaptable way.
It is extensible because it is not a fixed format like HTML (which is a single, predefined markup
language). Instead, XML is actually a metalanguage—a language for describing other
languages—which lets you design your own markup languages for limitless different types of
documents. XML can do this because it's written in SGML, the international standard
metalanguage for text document markup (ISO 8879).
Question:-What is DOM?
Answer: Document Object Model (DOM) is a W3C specification that defines a standard
(abstract) programming API to build, navigate and update XML documents. It is a "tree-
structure-based" interface. As per the DOM specification, the XML parsers (such as MSXML or
Xerces), load the entire XML document into memory, before it can be processed. XPath is used
to navigate randomly in the document, and various DOM methods are used to create and
update (add elements, delete elements, add/remove attributes, etc.) the XML documents.
Question:-What is XPath?
Answer: XML Path Language (XPath) is a W3C specification that defines syntax for addressing
parts of XML document. XML document is considered as a logical tree structure, and syntax
based on this consideration is used to address elements and attributes at any level in the XML
document. For example, considering the XML document described above in answer to question
2, /abc:Employees/abc:Emp/@EmpID XPath expression can be used to access the EmpID
attribute under the (first) Emp element under the Employees document element. XPath is used
in various other specifications such as XSLT.
Question:-What is XHTML?
Answer: Is simple words, XHTML, or Extensible HTML, is HTML 4 with XML rules applied to it
(each begin tag must have an end tag, attribute values in single/double quotes, etc.).
However, the overall vision of XHTML is much more than that. In addition to using XML syntax
for HTML, XHTML also encloses specifications such as XHTML Basic (minimal set of modules for
devices such as PDAs), XForms (represents the next generation of forms for the Web, and
separates presentation, logic, and data), XML Events (provides XML languages with the ability
to uniformly integrate event listeners and associated event handlers), etc.
To create an instance of Microsoft's XML parser with JavaScript, use the following code:
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
To create an instance of Microsoft's XML parser with VBScript, use the following code:
set xmlDoc=CreateObject("Microsoft.XMLDOM")
To create an instance of Microsoft's XML parser in an ASP page (using VBScript), use the
following code:
set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
The following code loads an existing XML document ("note.xml") into Microsoft's XML parser:
<script type="text/javascript">
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("note.xml")
...
...
...
</script>
Overlapping markup is not permitted (an element cannot start inside one element and end
inside another): element markup must nest hierarchically.
If you're asking about converting HTML to a less generic form of XML than XHTML, your task
may turn out to be quite complex. For example, if you've been using HTML to mark up
customer invoices, not only the customer's name but also their number, item(s) ordered,
quantity, and price are probably all wrapped up inside <p> and </p> tags. How do you know
which "kind of paragraph" contains a given kind of information, so you can turn one instance
of the p element into a custname element, another into custnumber, another into price, and so
on? If you've been using CSS for styling your HTML, you may have supplied the different p
elements with class="custname" (etc.) attributes and so on; if that's the case, you may be
able to generate meaningful XML using an XSLT stylesheet. There may also be customized
software to do the sort of conversion you want. Otherwise you're probably looking down the
barrel of an ugly gun.
C#.NET
Question: what do u mean by Array in C# ?
Answer: Array is a group of same type of datatype variable that shared a
common name .The ability to use a single name to represent a collections of
item is an array.There are manily three types of array.
*One-Dimensinal Array
*Two-Dimensinal Array
*Multi-Dimensinal Array
There are three steps include to create a Array
(1) Declare an array
(2)Creating memory location
(3)Putting values into the memory location
Declare the Array:-int[] counter;(declare int array)
Creating of Array:-arrayname=new type[size];
putting values in array:-number=new int[5];
number[0]=35;
VB.NET
- It didn't have the XML Documentation.
- It didn't have the Operator Overloading.
- It didn't have the Pointer Type variables.
C#.NET
- It has XML Documentation, Operator Overloading and supports Pointer
Variables using unsafe keyword.