ASP.NET INTERVIEW QUESTIONS

Question:-What do you mean by Share Point Portal? Answer: Here I have taken information regarding Share Point Portal Server 2003 provides mainly access to the crucial business information and applications. With the help of Share Point Server we can server information between Public Folders, Data Bases, File Servers and the websites that are based on . This Share Point Portal is integrated with MSAccess and Windows servers,So we can get a Wide range of document management functionality. We can also create a full featured portal with readymade navigation and structure.

Question:-What is cross page posting in ASP.NET2.0? Answer: When we have to post data from one page to another in application we used server.transfer method but in this the URL remains the same but in cross page posting there is little different there is normal post back is done but in target page we can access values of server control in the source page.This is quite simple we have to only set the PostBackUrl property of Button,LinkButton or imagebutton which specifies the target page.In target page we can access the PreviousPage property.And we have to use the @PreviousPageType directive.We can access control of PreviousPage by using the findcontrol method.When we set the PostBackURL property ASP.NET framework bind the HTML and Javascript function automatically.

Question: What you thing about the Web Portal? Answer: Web portal is nothing but a page that allows a user to customize his/her homepage. We can use Widgets to create that portal we have only to drag and drop widgets on the page. The user can set his Widgets on any where on the page where he has to get them. Widgets are nothing but a page area that helps particular function to response. Widgets example are address books, contact lists, RSS feeds, clocks, calendars, play lists, stock tickers, weather reports, traffic reports, dictionaries, games and another such beautiful things that we can not imagine. We can also say Web Parts in Share Point Portal. These are one of Ajax-Powered.

Question: How to start Outlook, Notepad file in AsP.NET with code ? Answer: Here is the syntax to open outlook or notepad file in ASP.NET VB.NET Process.Start("Notepad.exe") Process.Start("msimn.exe"); C#.NET System.Diagnostics.Process.Start("msimn.exe"); System.Diagnostics.Process.Start("Notepad.exe"); Question: What is the purpose of IIS ? Answer: We can call IIS(Internet Information Services) a powerful Web server that helps us creating highly reliable, scalable and manageable infrastructure for Web application which runs on Windows Server 2003. IIS helps development center and increase Web site and application availability while lowering system administration costs. It also runs on Windows NT/2000 platforms and also for above versions. With IIS, includes a set of programs for building and administering Web sites, a search engine, and support for writing Web-based applications that access database. IIS also called http server since it process the http request and gets http response.

Question: What is main difference between GridLayout and FormLayout ? Answer: GridLayout helps in providing absolute positioning of every control placed on the page. It is easier to devlop page with absolute positioning because control can be placed any where according to our requirement.But FormLayout is little different only experience Web Devloper used this one reason is it is helpful for wider range browser.If there is absolute positioning we can notice that there are number of DIV tags.But in FormLayout whole work are done through the tables.

Question: How Visual SourceSafe helps Us? Answer: One of the powerful tool provided by Microsoft to keep up-to-date of files system its keeps records of file history once we add files to source safe it can be add to database and the changes add by different user to this files are maintained in database from that we can get the older version of files to. This also helps in sharing, merging of files.

Question:-Can you define what is SharePoint and some overview about this? Answer: SharePoint helps workers for creating powerful personalized interfaces only by dragging and drop pre-defined Web Part Components. And these Web Parts components also help non programmers to get information which care and customize the appearance of Web pages. To under stand it we take an example one Web Part might display a user's information another might create a graph showing current employee status and a third might show a list of Employees Salary. This is also possible that each functions has a link to a video or audio presentation. So now Developers are unable to create these Web Part components and make them available to SharePoint users.

Question:-What is different between WebUserControl and in WebCustomControl ? Answer: Web user controls :- Web User Control is Easier to create and another thing is that its support is limited for users who use a visual design tool one gud thing is that its contains static layout one more thing a seprate copy is required for each application. Web custom controls:-Web Custom Control is typical to create and gud for dynamic layout and another thing is it have full tool support for user and a single copy of control is required because it is placed in Global Assembly cache.

Question:-What is Sandbox in SQL server and explain permission level in Sql Server ? Answer: Sandbox is place where we run trusted program or script which is created from the third party. There are three type of Sandbox where user code runs. Safe Access Sandbox:-Here we can only create stored procedure, triggers, functions,datatypes etc .But we does not have access memory ,disk etc. External Access Sandbox:-We can access File systems outside the box. We can not play with threading, memory allocation etc. Unsafe Access Sandbox:-Here we can write unreliable and unsafe code.

Question:-How many types of cookies are there in .NET ? Answer: Two type of cookeries. a) single valued eg request.cookies(”UserName”).value=”dotnetquestion” b)Multivalued cookies. These are used in the way collections are used example request.cookies(”CookiName”)(”UserName”)=”dotnetquestionMahesh” request.cookies(”CookiName”)(”UserID”)=”interview″

Question: When we get Error 'HTTP 502 Proxy Error' ? Answer: We get this error when we execute ASP.NET Web pages in Visual Web Developer Web server, because the URL randomly select port number and proxy servers did not recognize the URL and return this error. To resolve this problem we have to change settings in to bypass the proxy server for local addresses, so that the request is not sent to the proxy.

Question:-What do you mean by three-tier architecture? Answer: The three-tier architecture was comes into existence to improve management of code and contents and to improve the performance of the web based applications. There are mainly three layers in three-tier architecture. the are define as follows (1)Presentation (2)Business Logic (3)Database (1)First layer Presentation contains mainly the interface code, and this is shown to user. This code could contain any technology that can be used on the client side like HTML, JavaScript or VBScript etc. (2)Second layer is Business Logic which contains all the code of the server-side .This layer have code to interact with database database and to query, manipulate, pass data to user interface and handle any input from the UI as well. (3)Third layer Data represents the data store like MS Access, SQL Server, an XML file, an Excel file or even a text file containing data also some addtional database are also added to that layers.

Question: What is Finalizer in .NET define Dispose and Finalize? Answer: We can say that Finalizer are the methods that's helps in cleanp the code that is executed before object is garbage collected .The process is called finalization . There are two methods of finalizer Dispose and Finalize .There is little diffrenet between two of this method . When we call Dispose method is realse all the resources hold by an object as well as all the resorces hold by the parent object.When we call Dispose method it clean managed as well as unmanaged resources. Finalize methd also cleans resources but finalize call dispose clears only the unmanged resources because in finalization the garbase collecter clears all the object hold by managed code so finalization fails to prevent thos one of methd is used that is: GC.SuppressFinalize.

Question: Define SMTPclient class in Dot Net framework class ? Answer: Each classes in dotnet framework inclue some properties,method and events.These properties ,methods and events are member of a class.SMTPclient class mainly concern with sending mail.This class contain the folling member. Properties:- Host:-The name or IP address of email server. Port:-Port that is use when sending mail. Methods:- Send:-Enables us to send email synchronously. SendAsynchronous:-Enables us to send an email asynchronously. Event:- SendCompleted:-This event raised when an asynchronous send opertion completes.

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.

Question:-Does .NET CLR and SQL SERVER run in different process? Answer: Dot Net CLR and all .net realtes application and Sql Server run in same process or we can say that that on the same address because there is no issue of speed because if these two process are run in different process then there may be a speed issue created one process goes fast and other slow may create the problem. Question:-What is Com Marshler and its importance in .NET ? Answer: Com Marshler is one of useful component of CLR. Its Task is to marshal data between Managed and Unmanaged environment .It helps in representation of data accross diffrenet execution enviroment.It performs the conversion of data format between manage and unmanaged code.By the helps of Com Marshlar CLR allows manage code to interoperate with unmanaged code.

Question: What is CSU and its description ? Answer: CSU stands for comma separate values also called comma delimited.It is plain text file which stores spreadsheets or basic datatype in very simple format.One record in each line and each field separted with comma's it is often used to transfer large ammount spreadsheet data or database information between program.

Question: The IHttpHandler and IHttpHandlerFactory interfaces? Answer: The IHttpHandler interface is implemented by all the handlers. The interface consists of one property called IsReusable. The IsReusable property gets a value indicating whether another request can use the IHttpHandler instance. The method ProcessRequest() allows you to process the current request. This is the core place where all your code goes. This method receives a parameter of type HttpContext using which you can access the intrinsic objects such as Request and Response. The IHttpHandlerFactory interface consists of two methods - GetHandler and ReleaseHandler. The GetHandler() method instantiates the required HTTP handler based on some condition and returns it back to ASP.NET. The ReleaseHandler() method allows the factory to reuse an existing handler.

Question: what is Viewstate? Answer:View state is used by the ASP.NET page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state. State management is the process by which you maintain state and page information over multiple requests for the same or different pages. Client-side options are:

* The ViewState property * Query strings * Hidden fields * Cookies

Server-side options are: * Application state * Session state * DataBase

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. ASP.NET provides the following ways to retain variables between requests: 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.

Question: DOTNET PAGE LIFECYCLE? Answer: While executing the page, it will go under the fallowing steps (or fires the events) which collectively known as Page Life cycle. Page_Init -- Page Initialization LoadViewState -- View State Loading LoadPostData -- Postback data processing Page_Load -- Page Loading RaisePostDataChangedEvent -- PostBack Change Notification RaisePostBackEvent -- PostBack Event Handling Page_PreRender -- Page Pre Rendering Phase SaveViewState -- View State Saving Page_Render -- Page Rendering Page_UnLoad -- Page Unloading

Question: What is Satellite Assemblies? Answer: Satellite assemblies are often used to deploy language-specific resources for an application. These language-specific assemblies work in side-by-side execution because the application has a separate product ID for each language and installs satellite assemblies in a language-specific subdirectory for each language. When uninstalling, the application removes only the satellite assemblies associated with a given language and .NET Framework version. No core .NET Framework files are removed unless the last language for that .NET Framework version is being removed. For example, English and Japanese editions of the .NET Framework version 1.1 share the same core files. The Japanese .NET Framework version 1.1 adds satellite assemblies with localized resources in a \ja subdirectory. An application that supports the .NET Framework version 1.1, regardless of its language, always uses the same core runtime files.

Question: What is CAS? Answer: CAS: CAS is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk. How does CAS work? The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set. For example, using the default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' code group, which adheres to the permissions defined by the 'Internet' named permission set. (Naturally the 'Internet' named permission set represents a very restrictive range of permissions.)

Question: Automatic Memory Management? Answer: Automatic Memory Management: From a programmer's perspective, this is probably the single biggest benefit of the .NET Framework. No, I'm not kidding. Every project I've worked on in my long career of DOS and Windows development has suffered at some point from memory management issues. Proper memory management is hard. Even very good programmers have difficulty with it. It's entirely too easy for a small mistake to cause a program to chew up memory and crash, sometimes bringing the to a screeching halt in the process.

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.

Question: What Language familiar to CLR? Answer: Any language that can be compiled into Microsoft Intermediate Language (MSIL) is considered a .NET-compliant language. Following are a few of the popular .NET-compliant languages supported by CLR:

ADO.NET

Question:-How ADO.NET come into existence? Answer: DAO (data access model) is the first Data Access Model that is created for local databases which contains built-in Jet engine which overcome with some problem like performance and functionality issues. After this RDO (Remote Data Object) and ADO (Active Data Object) comes in market which basically designed for Client Server applications but soon ADO is more comfort then RDO. ADO a good architecture ADO contained all the data in a recordset object which creates problems when implemented on the network where firewalls exist. Because ADO was a connected data access, which make connection open until the application is closed. This creates issue like database security and network traffic. Because open database connections use system resources to a maximum extent making the system performance less effective. This helps in developing of ADO.NET.

Question: What is Asynchronous Database Commands? Answer:- When we execute any database. Thread that executing the command waits before the command get fully executing before executing any additional code. Thread is blocked for another process. But Asynchronous Database Commands solve this problem when database command is executing the current thread can continue on other process. Thread can execute a no of database command. There are two benefits of using Asynchronous Database Commands. 1) Executing Multiple Database Commands simultaneously improve performance. 2) Because ASP.Net framework uses a limited pool service for request. When any request for a page is comes its assign a thread to handle the request. If framework is out of thread then job is in guess we get error 503. But if we are using asynchronous database command then current thread is release back to current thread pool.

Question:-What are 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:-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.

Question: How to get result from two table in Sql DataReader ? Answer: string str="Select * from table1;Select * from table2"; cmd.commandtext=str; dr=cmd.executereader(); Question: What is Ref Cursor in .NET and how it is link with ExecuteReader ? Answer: Ref cursor play its role when doing with the oracle database these comes in ODP.NET. Ref Cursors are objects that link to Oracle server-side cursors.These Ref Cursor can be converted in oracle datareader with this Ref cursor we can get result with query written to pl/sql and the result can be get in .net.Now the question arise why we use Ref Cursor when we have an option of ExceuteReader reson is simple when we need more query in pl/sql means our work is done in pl/sql then we need this ref cursor for getting result set because doennot have direct connection to that table.Becasue advantage of pl/sql we can take two opertion in one query. Question: Define tool Manage Statistics in SQL Serevr 2000 query ? Answer: SQL Server creates internal statistics on the rows in all of our tables that is used by the Query Optimizer to select the optimal execution plan for our query. And Query Optimizer helps in doing this.Soome time when statistics isnot maintains then this is done by tool Manage Statistics.We can add,edit or delete for statistics that is maintained by SQL Server.We can experiment with different sets of statistics and see how it affects the query otimizer execution plans. Question: Some important instruction regarding ADO.NET connection string ? Answer: When we are making connection string always use Server's IP address not the DNS name if we use IP address it will reduce the time taken for connection to establish.Becasue server IP address is used to get a default or named instance of Sql Server that ls running. if we are running the cluster we have to use the Virtual SQL Server IP address. Question: How to get database schema information when connection object is establish in ADO.NET ? Answer: There is a method that helps in getting schema information that is GetSchema() and this method is called in three different ways first way when we call this method without any parameter its return the metadata(table, view, stored procedure.indexes etc).When method is called by passing metadata collection name and filter criteria returns the items from the collection after applying the filter criteria and last way is when we called by passing a metadata collection name returns information about items found in the specified collection. Question: Which one is better WebServices and Remoting? Answer: Both of these have little difference WebServices help full where the user who is using Web Service does not have the .NET platform. On the otherside for remoting we need .Net platform on the both side so from both of this remoting is faster then webservice.So keep in mind which of these are you using if you have .net plateform or other.

Question:-What is DataGrid wheater its a Server Control or something else ? Answer:DataGrid is Web server control a powerful tool for displaying information from a data source. we can display editable data in a professional-looking grid by setting only a few properties. The grid has a sophisticated object model that provides you with great flexibility in how you display the data.

Question:-Define different execute methods of ADO.NET command object ? Answer: ExecuteScalar:- This method returns a single value from the first row and first column of the result get from the execution of SQL query. ExecuteNonQuery:- This method executes the DML SQL query just like insert, delete or update and then returns the number of rows affected by the action. ExecuteReader:- This method returns DataReader object which is a forward-only resultset. ExecuteXMLReader:- This method is available for SQL Server 2000 or later. Upon execution it builds XMLReader object from standard SQL query. Question:-What DataReader class do in ADO.NET? Answer: To get read-only and forward only access to data we use DataReader .the DataReader object reduces the system overhead because one row at a time is taken into memory so it is quite lightweight. To get second object connection is reconnected. We can create a DataReader object by execute Execute readre() method. There are two Data Reader class one is SqlDataReader and other is OleDbDataReader. Question:-Why is ADO.NET serialization slower than ADO ? Answer: ADO uses binary serialization while ADO.NET uses text based serialization. Since the text takes more space, it takes longer to write it out. Question:-Is XML is a component of ADO.NET ? Answer: The answer of this question is always Yes because XML is an important component of ADO.NET architecture .ADO.NET use XML to store and transfer data.We not have to convert data to XML format.Datasets helps XML to integrate with ADO.NET. XML schema plays a role to get table definition,column,datatypes and constraints helps DataSet.

Question:- How to check if the Dataset has records ? Answer: if (ds.Tables(0).Rows.Count= 0 ) { 'No record else 'record found }

Question:- What is the significance of CommandBehavior.CloseConnection ? Answer: To avoid having to explicitly close the connection associated with the command used to create either a SqlDataReader or and OleDbDataReader, pass the CommandBehavior.CloseConnection argument to the ExecuteReader method of the Connection. 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:-Which method do you invoke on the DataAdapter control to load your generated dataset with data? Answer: The Fill() method.

Question:-What is Dataset and Diffgram? Answer: When sending and retrieving a Dataset from an XML Web service, the DiffGram format is implicitly used. Additionally, when loading the contents of a DataSet from XML using the ReadXml method, or when writing the contents of a DataSet in XML using the WriteXml method, you can select that the contents be read or written as a DiffGram. For more information, see Loading a DataSet from XML and Writing a DataSet as XML Data. While the DiffGram format is primarily used by the .NET Framework as a serialization format for the contents of a DataSet, you can also use DiffGrams to modify data in tables in a Microsoft SQL Server™ 2000 database.

Question:-What is typed dataset? Answer: A typed dataset is very much similar to a normal dataset. But the only difference is that the sehema is already present for the same. Hence any mismatch in the column will generate compile time errors rather than runtime error as in the case of normal dataset. Also accessing the column value is much easier than the normal dataset as the column definition will be available in the schema.

Question:-How can you provide an alternating color scheme in a Repeater control? Answer: 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.

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.

Question:-What are the differences between Datalist DataGrid and datarepeater ? Answer:DataList

 Has table appearence by default  Has no autoformat option  has no default paging & sorting options  can define separators between elements using template DataGrid  Has a grid appearence by default  has a autoformat option  has default paging and sorting  has no separator between elements DataRepeater  simple,read-only output, has no built in support for selecting or editing items, has no DEFAULT APPEARENCE, has no default paging.

.NET Interview Questions

Explain the .NET architecture.

How many languages .NET is supporting now? - When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported.

How is .NET able to support multiple languages? - a language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.

How ASP .NET different from ASP? - Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.

Resource Files: How to use the resource files, how to know which language to use?

What is smart navigation? - The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed. What is view state? - The web is stateless. But in ASP.NET, the state of a page is maintained in the in the page itself automatically. How? The values are encrypted and saved in hidden controls. this is done automatically by the ASP.NET. This can be switched off / on for a single control

How do you validate the controls in an ASP .NET page?

- Using special validation controls that are meant for this. We have Range Validator, Email Validator.

Can the validation be done in the server side? Or this can be done only in the Client side? - Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.

How to manage pagination in a page? - Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.

What is ADO .NET and what is difference between ADO and ADO.NET? - ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

Interview questions for Web application developers

Is it possible to inline assembly or IL in C# code? - No.

Is it possible to have a static indexer in C#? - No. Static indexers are not allowed in C#.

If I return out of a try/finally in C#, does the code in the finally-clause run? - Yes. The code in the finally always runs. If you return out of the try block, or even if you do a “goto” out of the try, the finally block always runs:

Using System;

class main { public static void Main() { try { Console.WriteLine(\"In Try block\"); return; } finally { Console.WriteLine(\"In Finally block\"); } } }

Both “In Try block” and “In Finally block” will be displayed. Whether the return is in the try block or after the try- finally block, performance is not affected either way. The compiler treats it as if the return were outside the try block anyway. If it’s a return without an expression (as it is above), the IL emitted is identical whether the return is inside or outside of the try. If the return has an expression, there’s an extra store/load of the value of the expression (since it has to be computed within the try block).

I was trying to use an “out int” parameter in one of my functions. How should I declare the variable that I am passing to it? - You should declare the variable as an int, but when you pass it in you must specify it as ‘out’, like the following: int i; foo(out i); where foo is declared as follows: [return-type] foo(out int o) { }

How do you specify a custom attribute for the entire assembly (rather than for a class)? - 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 {}

Note that in an IDE-created project, by convention, these attributes are placed in AssemblyInfo.cs.

How do you mark a method obsolete? -

[Obsolete] public int Foo() {...} or

[Obsolete(\"This is a message describing why this method is obsolete\")] public int Foo() {...}

Note: The O in Obsolete is always capitalized.

How do you directly call a native function exported from a DLL? - Here’s a quick example of the DllImport attribute in action: using System.Runtime.InteropServices; \ class C { [DllImport(\"user32.dll\")] public static extern int MessageBoxA(int h, string m, string c, int type); public static int Main() { return MessageBoxA(0, \"Hello World!\", \"Caption\", 0); } }

This example shows the minimum requirements for declaring a C# method that is implemented in a native DLL. The method C.MessageBoxA() is declared with the static and external modifiers, and has the DllImport attribute, which tells the compiler that the implementation comes from the user32.dll, using the default name of MessageBoxA. For more information, look at the Platform Invoke tutorial in the documentation.

How do I simulate optional parameters to COM calls? - You must use the Missing class and pass Missing.Value (in System.Reflection) for any values that have optional parameters. C# developer interview questions

A representative of a high-tech company in United Kingdom sent this in today noting that the list was used for interviewing a C# .NET developer. Any corrections and suggestions would be forwarded to the author. I won’t disclose the name of the company, since as far as I know they might still be using this test for prospective employees. Correct answers are in green color.

1) The C# keyword .int. maps to which .NET type?

1. System.Int16 2. System.Int32 3. System.Int64 4. System.Int128

2) Which of these string definitions will prevent escaping on backslashes in C#?

1. string s = #.n Test string.; 2. string s = ..n Test string.; 3. string s = @.n Test string.; 4. string s = .n Test string.;

3) Which of these statements correctly declares a two-dimensional array in C#?

1. int[,] myArray; 2. int[][] myArray; 3. int[2] myArray; 4. System.Array[2] myArray;

4) If a method is marked as protected internal who can access it?

1. Classes that are both in the same assembly and derived from the declaring class. 2. Only methods that are in the same class as the method in question. 3. Internal methods can be only be called using reflection. 4. Classes within the same assembly, and classes derived from the declaring class.

5) What is boxing?

a) Encapsulating an object in a value type.

b) Encapsulating a copy of an object in a value type.

c) Encapsulating a value type in an object.

d) Encapsulating a copy of a value type in an object.

6) What compiler switch creates an xml file from the xml comments in the files in an assembly?

1. /text 2. /doc 3. /xml 4. /help

7) What is a satellite Assembly?

1. A peripheral assembly designed to monitor permissions requests from an application. 2. Any DLL file used by an EXE file. 3. An assembly containing localized resources for another assembly. 4. An assembly designed to alter the appearance or .skin. of an application.

8) What is a delegate?

1. A strongly typed function pointer. 2. A light weight thread or process that can call a single method. 3. A reference to an object in a different process. 4. An inter-process message channel.

9) How does assembly versioning in .NET prevent DLL Hell?

1. The runtime checks to see that only one version of an assembly is on the machine at any one time. 2. .NET allows assemblies to specify the name AND the version of any assemblies they need to run. 3. The compiler offers compile time checking for backward compatibility. 4. It doesn.t.

11) In the NUnit test framework, which attribute must adorn a test class in order for it to be picked up by the NUnit GUI?

1. TestAttribute 2. TestClassAttribute 3. TestFixtureAttribute 4. NUnitTestClassAttribute

12) Which of the following operations can you NOT perform on an ADO.NET DataSet?

1. A DataSet can be synchronised with the database. 2. A DataSet can be synchronised with a RecordSet. 3. A DataSet can be converted to XML. 4. You can infer the schema from a DataSet.

13) In Object Oriented Programming, how would you describe encapsulation?

1. The conversion of one type of object to another. 2. The runtime resolution of method calls. 3. The exposition of data. 4. The separation of interface and implementation.

.NET deployment questions What do you know about .NET assemblies? Assemblies are the smallest units of versioning and deployment in the .NET application. Assemblies are also the building blocks for programs such as Web services, Windows services, serviced components, and .NET remoting applications.

What’s the difference between private and shared assembly? Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.

What’s a strong name? A strong name includes the name of the assembly, version number, culture identity, and a public key token.

How can you tell the application to look for assemblies at the locations other than its own install? 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.

How can you debug failed assembly binds? Use the Assembly Binding Log Viewer (fuslogvw.exe) to find out the paths searched.

Where are shared assemblies stored? Global assembly cache.

How can you create a strong name for a .NET assembly? With the help of Strong Name tool (sn.exe).

Where’s global assembly cache located on the system? Usually C:\winnt\assembly or C:\windows\assembly.

Can you have two files with the same file name in GAC? Yes, remember that GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it’s possible for MyApp.dll and MyApp.dll to co-exist in GAC if the first one is version 1.0.0.0 and the second one is 1.1.0.0.

So let’s say I have an application that uses MyApp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name MyApp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new MyApp.dll? Use publisher policy. To configure a publisher policy, use the publisher policy configuration file, which uses a format similar app .config file. But unlike the app .config file, a publisher policy file needs to be compiled into an assembly and placed in the GAC.

What is delay signing? Delay signing allows you to place a shared assembly in the GAC by signing the assembly with just the public key. This allows the assembly to be signed with the private key at a later stage, when the development process is complete and the component or assembly is ready to be deployed. This process enables developers to work with shared assemblies as if they were strongly named, and it secures the private key of the signature from being accessed at different stages of development.

WEB SERVICES INTERVIEW QUESTIONS

Asp Net Web Services: Here are some web services interview questions which is very helpful in interviews. This great listing of interview questions provides a lot of information on Web Services Questions and Web Services Faqs. Not at all, instead of web services faqs and interview questions you can also learn how to use web services in asp net. If you need more web services faqs used in asp net you can also contact us for more info.

Question: Can you define basic element of WebServices and explain any one from them? Answer: These are as follows SOAP, WSDL and UDDI. And I am explaining about the SOAP(Simple Object Access Protocol) it is a communication protocol it is for communication between application it is platform and language independent.It is based on XML and also help to get from Firwall.

Question: Explain functioning of Web Services Protocols ? Answer: Http-Get:- This is standard protocol that helps client to communicate with server with HTTP.When client send a request to server via HTTP request and reuired parameter are attached with the querystring.Example:- http://www.dotnetquestion.info/dotnet/interview.aspx?id=pervej&cast=munjal and we get the value from querystring. Request.querystring("id") Request.querystring("cast").

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: How .NET and non .NET component communicate with each other when they are on different platform? Answer: In past when we have to communicate .NET with non .NET component we are using COM component this component helps in doing this. At the moment we are using in both apps a COM component that has an intermediary Windows service running on one machine. But this component is quite old and not in use now because it will create a problem when we are using firewall. So to handle this we use Web-Services which really have a solution for Firewall.

Question: Why do some web service classes derive from System.Web.WebServices while others do not ? Answer: Those asp net Web Service classes which employ objects like Application, Session, Context, Server, and User have to derive from System.Web.WebServices. If it does not use these objects, it is not necessary to be derived from it.

Question: What is WSDL ? Answer: WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). (Source: www.w3.org).

Question: What is the standard you use to wrap up a call to a Web service ? Answer: HTTP with SOAP.

Question: What is Asp Net Web Services ? Answer: Web services are programmable business logic components that provide access to functionality through the Internet. Standard protocols like HTTP can be used to access them. Web services are based on the Simple Object Access Protocol (SOAP), which is an application of XML. Web services are given the .asmx extension..

Question: Define Protocols that helps Web Services in Asp Net? Answer: From my point of view Web Services used three protocols for interacting with the clients.Http- Post,Http-Get,SOAP.

Question: What are VSDISCO files ? Answer: VSDISCO files are DISCO files that enable dynamic discovery of Web Services. ASP.NET links the VSDISCO to a HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document. A client who requests a VSDISCO file gets back what appears to be a static DISCO document.

Question: What is UDDI ? Answer: UDDI stands for Universal Description, Discovery, and Integration. It is like an "Yellow Pages" for Web Services. It is maintained by Microsoft, IBM, and Ariba, and is designed to provide detailed information regarding registered Web Services for all vendors. The UDDI can be queried for specific Web Services.

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 Asp Net 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.

(ii)Application Integration When integrating applications written in various languages and running on disparate systems. Or even applications running on the same platform that have been written by separate vendors.

(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 Applications. 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.

Question: What are Service Oriented Architectures (SOA) ? Answer: SOA describes an information technology architecture that enables distributed computing environments with many different types of computing platforms and applications. Web services in asp net are one of the technologies that help make SOAs possible. As a concept, SOA has been around since the 1980s, but many early IT technologies failed to achieve the goal of linking different types of applications and systems. By making early investments with .NET, Microsoft has helped provide the building blocks that today are putting many enterprise customers on the path to successfully implementing SOAs. With SOAs, companies can benefit from the unimpeded flow of information that is the hallmark of connected systems.

Question: What is .NET Passport? Answer: .NET Passport is a Web-based service that is designed to make signing in to Web sites fast and easy. Passport enables participating sites to authenticate a user with a single set of sign-in credentials, alleviating the need for users to remember numerous passwords and user names.

XML Interview Question

Question :Parse an XML file or XML file validation ? Answer: We can parse an xml FILE with an xsd FILE. It message us that our file is not well-formed and then if it is not valid it lists out the specific reason ,it is quite helpful to find an error in a large XML file it also returns line number which contain error also the tag name. That is done in Visual Studio .NET so to get it to work you will have to change the code around to whatever you want to do. One thing is that we must have namespace in the root element of the XML file.

Question:-Is it possible that XML accept UNICODE characters ? Answer: Yes XML documents can contain foreign characters, like Norwegian æ ø å , or French ê è é.But XML document can not under stand this to understand this we have to take XML as UNICODE.There are some encoding techniques. .

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 XMLA define it ? Answer: First of we take a full form of XMLA (XML Analysis Services). Analysis Service was designed to draw reports from data contained in a Data Warehouses and doe snot have any relation with data structure.From XMLA we can expose the Analysis service data to external world in XML.

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 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.

Question:-What is XML Parser ? Answer: Microsoft's XML parser is a COM component that comes with Internet Explorer 5 and higher. Once you have installed Internet Explorer, the parser is available to scripts. Microsoft's XML parser supports all the necessary functions to traverse the node tree, access the nodes and their attribute values, insert and delete nodes, and convert the node tree back to XML.

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:

Question:- Some Limitation or Disadvantage of XML? Answer: XML markup has a few disadvantages: It can be verbose unless element and attribute names are chosen with care. In large documents the markup overhead need not be large, but in short messages it can be significantly more than the actual data, especially when the element or attribute names are concocted by machine.

Overlapping markup is not permitted (an element cannot start inside one element and end inside another): element markup must nest hierarchically.

Some of the software is truly mediocre.

Question:- How to add in XML document through XSL ? Answer: XSL (the eXtensible Stylesheet Language) is far more sophisticated than CSS. One way to use XSL is to transform XML into HTML before it is displayed by the browser as demonstrated in these examples: Below is a fraction of the XML file. The second line, , links the XML file to the XSL file: Belgian Waffles $5.95 two of our famous Belgian Waffles 650

Question:- How do I convert my existing HTML documents into XML? Answer: Tidy is a command-line utility which runs on a wide variety of operating systems; it uses various command-line switches (parameters) to control its processing. At a minimum, it simply cleans up your HTML by ensuring that elements are properly nested and so on; it also warns you if your HTML uses non- standard code that's likely to cause cross-browser compatibility problems. One of the most useful command-line options is -asxml ("as XML," see?), which does what you seem to be asking. It will properly balance elements, per usual, but it also adds some extra information to the document. For instance, it tacks on an XML declaration, , and a statement, which unambiguously mark this as an XML document. To the root html element it also adds a namespace-declaring attribute that identifies all elements in the document as conforming to the specific XML vocabulary known as XHTML. It even forces all element names to lowercase, since the XHTML standard requires it.

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

and

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.

Question:- What is a schema? What are the limitations of a DTD? Answer: SCHEMA is nothing but METADATA. The schema holds all the information of the xml file that is to be deployed in the project. Metatdata is nothing about data about data since we know that xml is used for data representation language we will be able to understand what metadata is. Metadata includes the tags that is going to be exchanged to and fro from another xml file. DTD (DATA TYPE DEFINITION ) which supervises two conditions namely well formedness and closeness of the xml file. So the user should be aware of what tags he was put into use of this xml file 'A' should be intimated to another application's XML file 'B', by then our xml file will interact with the another xml file, this is the major limitation and mandatory issue that the developers should follow.

COM, DCOM +DCOM+

Question:-Can it is possible to use COM objects from a .NET Framework program ? Answer: :- I think yes COM component which we have deployed today can be used from managed code, and in common cases the its adopt automatic. To access com component from the .NET Framework we use runtime callable wrapper (RCW). This wrapper turns the COM interfaces exposed by the COM component into .NET Framework-compatible interfaces. For OLE automation interfaces, the RCW can be generated automatically from a type library. But for non-OLE automation interfaces, a developer may have to write a custom RCW and then manually map types that is exposed by the COM interface to .NET Framework-compatible types.

Question:-What is Monikers when using COM ? Answer: Clients always require a easy way to reconnect the same process where he is on last time or we can say that exact same state at a later point in time. This support is provided via "monikers". A moniker is a COM object that helps in this task because its knows how to create and initialize the content of a single COM object instance. A moniker can be asked to bind to the COM object it showing, so a COM object on specific machine on the network, or a group of cells inside a spreadsheet.

Question:-Explain Transaction with COM+ Components? Answer: Transaction consists of group of task bind in a single execution unit .When a transaction starts with specific task it is completed when all the statement in units are completed if any one produce error it will Rollback.So transaction have only two result Success and failure. On the other hand COM+ components need code to transaction.Because it will automatically participate in transaction.Its not require any explicit code to specify the start and end of transaction.when we create an object of COM+ it is activated with BeginTransaction with COM+ services provides.And this object is deactivated using CommitTransaction or AbortTransaction method.

Question:-How COM+ Component adopt security? Answer: To reduce complexity COM+ used or provides role-based security service that's helps in middle-tier components.There are two types of role-based security. (1)Declaractive (2)Programmatic When we applied and configure security without using an explicit programming interface is known as declartive security settings. On the other hand there are some situation when work load is heavy and secuirty is must and exchange of data accross the network and security measure should be taken with programming interface and it is known as programmactic secrity.

Question:-What are the COM Component in .Net? Answer: .Net not helps in creation of COM components and provides a different solution for making reusable components through Assemblies.There are many COM components present which our .Net application might need to use..Net provides an extremely simple approach to achieve this. We use com by ‘Wrapper Classes’ and ‘Proxy Components’. .Net wraps the COM component into .Net assembly technically called ‘Runtime Callable Wrapper’ or RCW. Then u can call and use your COM component just as a .Net (or C#, if u are using C#) Assembly.

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:-Which namespace do the classes, allowing you to support COM functionality, are located? Answer: System.EnterpriseServices

Question:- How do you make a NET component talk to a COM component? Answer: To enable the communication between COM and .NET components, the .NET Framework generates a COM Callable Wrapper (CCW). The CCW enables communication between the calling COM code and the managed code. It also handles conversion between the data types, as well as other messages between the COM types and the .NET types.

Question:-How do you generate an RCW from a COM object? Answer: Use the Type Library Import utility shipped with SDK. tlbimp COMobject.dll /out:.NETobject.dll or reference the COM library from Visual Studio in your project.

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:- I want to expose my .NET objects to COM objects. Is that possible? Answer: Yes, but few things should be considered first. Classes should implement interfaces explicitly. Managed types must be public. Methods, properties, fields, and events that are exposed to COM must be public. Types must have a public default constructor with no arguments to be activated from COM. Types cannot be abstract.

Question:-Can you inherit a COM class in a .NET application? Answer: The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by the runtime. The derived type can expose all the method and properties of the COM object as well as methods and properties implemented in managed code. The resulting object is partly implemented in managed code and partly implemented in unmanaged code.

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. VB.NET QUESTION

Question:-Can you define what is Jagged Array in VB.NET ? Answer: Jagged array is multidimensional array. If jagged array is two dimensinal it also contain a table where each row can have a different number of columns. A jagged array is really an array of arrays. To create a jagged array, you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets.

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.

Question:-What do u mean by Redim in VB.NET ? Answer: In vb.net we use Redim and erase to manipulate Array. Once we declare an array the size set to array its makes limited to that range but with the help of redim we used to change the array size. Redim arr(6) we can also used preserve to save these values. Redim Preserve arr(6)

Question:- What is branching logic control in vb.net ? Answer: Function and subroutines are the answer.The diffrence in two of them is function send information back from where it is called means function can return a value but subroutines can not do this.

Question:-Write the role of New keyword ? Answer: New is used to initialize a new object. We sets a variable to any dattype with help of New keyword .The New keyword gives a value to the variable.We can also uses new keyword to initialize an object variable. Example:- dim obj as new SqlDataAdapter.

Question: What is diffrenet between import System.Data.SqlClient,System.Data.Oledb ? Answer: System.Data.OleDB It contains the objects that we use to connect to a data source via an OleDB provider , such as OleDbConnection, OleDBCOmmand. System.Data.SqlClient It contains objects that we use to connect to a data source via Tabular data stream interface provided by Microsoft Sql Server. This can be generally used to provide better performance because it removes some of the intermediate layers required by the OleDB provider.

Question: What is the difference between DataTable and DataSet Answer: Dataset: Represents an in-memory cache of data we can also say data set is a collection of data table it is based on xml format ,it is used for data storing in cache as a disconnected recordset dataset is using data manipulation in cache wthout connection to database. DataTable: Represents one table of in- memory data data table can have one table only or we can say Data table is a collection of record's that consist the single table

Question: What is the difference between VB and VB.NET? Answer: Object-based language and Does not support inheritance also ADO.Net does not give support for disconnected data architecture and there is No interoperability function and No support for threading. On the other hand VB.NET is Object-Oriented Programming language and ADO.Net gives support for disconnected data architecture also provides interoperability and Its uses managed code and supports threading also provides access to third-party controls like COM, DCOM