• +91 9723535972
  • info@interviewmaterial.com

DotNet Interview Questions and Answers

DotNet Interview Questions and Answers

Question - 71 : - What class does Icon derive from? Isn’t it just a Bitmap with a wrapper name around it?

Answer - 71 : - No, Icon lives in System.Drawing namespace. It’s not a Bitmap by default, and is treated separately by .NET. However, you can use ToBitmap method to get a valid Bitmap object from a valid Icon object.

Question - 72 : - Before in my VB app I would just load the icons from DLL. How can I load the icons provided by .NET dynamically?

Answer - 72 : - By using System.Drawing.SystemIcons class, for example System.Drawing.SystemIcons.Warning produces an Icon with a warning sign in it.

Question - 73 : - When displaying fonts, what’s the difference between pixels, points and ems?

Answer - 73 : - A pixel is the lowest-resolution dot the computer monitor supports. Its size depends on user’s settings and monitor size. A point is always 1/72 of an inch. An em is the number of pixels that it takes to display the letter M.

Question - 74 : - What is the difference between VB 6 and VB.NET?

Answer - 74 : - VB 1,Object-based Language 2,Doesnot support Threading 3,Not powerful Exception handling mechanism 4,Doesnot having support for the console based applications 5,Cannot use more than one version of com objects in vb application called DLL error 6,Doesnot support for the Disconnected data source. VB.Net 1,Object-oriented Language 2,supports Threading 3,powerful Exception handling mechanism 4,having support for the console based applications 5,More than one version of dll is supported 6,supports the Disconnected data source by using Dataset class

Question - 75 : - What is the  difference between VB 6 and VB.NET?

Answer - 75 : - 1.The concept of the complete flow of execution of a program from start to finish: Visual Basic hides this aspect of programs from you, so that the only elements of a Visual Basic program you code are the event handlers and any methods in class modules. C# makes the complete program available to you as source code. The reason for this has to do with the fact that C# can be seen, philosophically, as next-generation C++. The roots of C++ go back to the 1960s and predate windowed user interfaces and sophisticated operating systems. C++ evolved as a low-level, closeto- the-machine, all-purpose language. To write GUI applications with C++ meant that you had to invoke the system calls to create and interact with the windowed forms. C# has been designed to build on this tradition while simplifying and modernizing C++, to combine the low-level performance benefits of C++ with the ease of coding in Visual Basic. Visual Basic, on the other hand, is designed specifically for rapid application development of Windows GUI applications. For this reason, in Visual Basic all the GUI boilerplate code is hidden, and all the Visual Basic programmer implements are the event handlers. In C# on the other hand, this boilerplate code is exposed as part of your source code. 2. Classes and inheritance: C# is a genuine object-oriented language, unlike Visual Basic, requiring all code to be a part of a class. It also includes extensive support for implementation inheritance. Indeed, most well-designed C# programs will be very much designed around this form of inheritance, which is completely absent in Visual Basic.

Question - 76 : - What are the authentication methods in .NET?

Answer - 76 : - There are 4 types of authentications. 1.WINDOWS AUTHENTICATION 2.FORMS AUTHENTICATION 3.PASSPORT AUTHENTICATION 4.NONE/CUSTOM AUTHENTICATION The authentication option for the ASP.NET application is specified by using the tag in the Web.config file, as shown below: other authentication options 1. WINDOWS AUTHENTICATION Schemes I. Integrated Windows authentication II. Basic and basic with SSL authentication III. Digest authentication IV. Client Certificate authentication 2. FORMS AUTHENTICATION You, as a Web application developer, are supposed to develop the Web page and authenticate the user by checking the provided user ID and password against some user database 3.PASSPORT AUTHENTICATION A centralized service provided by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site 4 NONE/CUSTOM AUTHENTICATION: If we don’t want ASP.NET to perform any authentication, we can set the authentication mode to “none”. The reason behind this decision could be: We don’t want to authenticate our users, and our Web site is open for all to use. We want to provide our own custom authentication

Question - 77 : - What is Serialization in .NET?

Answer - 77 : - 1 The serialization is the process of converting the objects into stream of bytes. they or used for transport the objects(via remoting) and persist objects(via files and databases) 2 When developing smaller applications that do not have a database (or other formal storage mechanism) or data that doesn’t need to be stored in a database (such as the state of a web application), you often still would like to save the data for later retrieval. There are many ways to do this, but many of them are subject to a lot of extra code (work) and extra time spent debugging. With .NET, there is now an easy way to add this functionality to your code with only a few lines of easily tested code. This easy way is called serialization. Serialization is the process of storing an object, including all of its public and private fields, to a stream. Deserialization is the opposite – restoring an object’s field values from a stream. The stream is generally in the form of a FileStream, but does not have to be. It could be a memory stream or any other object that is of type IO.Stream. The format can be anything from XML to binary to SOAP.

Question - 78 : - What’s the use of System.Diagnostics.Process class?

Answer - 78 : - By using System.Diagnostics.Process class, we can provide access to the files which are presented in the local and remote system.

Question - 79 : - How to achieve Polymorphism in VB.Net?

Answer - 79 : - We can achieve polymarphism in .Net i.e Compile time polymarphism and Runtime polymarphism. Compiletime Polymarphism achieved by method overloading. Runtime polymarphism achieved by Early Binding or Late Binding. Provide the function pointer to the object at compile time called as Early Binding. provide the function pointer to the object at runtime called as Late Binding class emp having the method display() class dept having the method display() create objects as in the main function // Early binding dim obj as new emp dim ob as new dept obj.display()-to call the display method of emp class ob.display-to call the display method of the dept class // Late binding create object in the main class as object obj obj=new emp obj.display()-to call the display of emp class obj=new dept obj.display()-to call the display of dept class

Question - 80 : - What doesu mean by .NET framework?

Answer - 80 : - The .NET Framework is an environment for building, deploying, and running Web Services and other applications. It consists of three main parts: the Common Language Runtime, the Framework classes, and ASP.NET


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners