VB.NET Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

VB.NET Interview Questions & Answers

Need to change your career to VB.NET? Then we will offer you with all the essential entity for you to clear the interview in VB.NET jobs. With our jobs portal you will find the number of jobs associated to you along with the VB.NET Interview Questions and Answers. There are numerous leading companies that offer jobs in several roles like VB/.Net Developer - C#/MS SQL, VB.Net Developer, VB Programmer, Net Developer - ASP/VB/C#, X Vb.net Developer X, RPA Developer - .Net/VB/C# and many other roles too. To save the time in searching for all the interview questions and answers on different site we have provided you all type of interview question and answers at one place. For more details on VB.NET visit our site www.wisdomjobs.com.

VB.NET Interview Questions

VB.NET Interview Questions
    1. Question 1. What Are The Properties Should Be Given To Set Method?

      Answer :

      Class Class1
      ' Define a local variable to store the property value.
      [Ans: Only One Property.
      example:
      Private PropertyValue As String
      ' Define the property.
      Public Property Prop1() As String
      Get
      ' The Get property procedure is called when the value
      ' of a property is retrieved.
      Return PropertyValue
      End Get
      Set(ByVal Value As String)
      ' The Set property procedure is called when the value
      ' of a property is modified.
      ' The value to be assigned is passed in the
      ' argument to Set.
      PropertyValue = Value
      End Set
      End Property
      End Class

    2. Question 2. How Can We Assigns Items On Listbox So That It Will Show Rowwise Please Write The Code For It.

      Answer :

      Lisbox1.Items.Add "Prashant"
      Lisbox1.Items.Add "Chinchu"
      Lisbox1.Items.Add "Pallavi"
      Lisbox1.Items.Add "Suresh"
      Lisbox1.Items.Add "Polika"

    3. Question 3. What Is Vb.net?

      Answer :

      Vb.net is a programming language that is available in Visual Studio. Net. It contains features of visual basic which is event based programming language and also includes object oriented concepts.
      [VB.Net is a programming language which is an extension of Visual Basic to make it compliant to the Dot Net Framework. Also VB.Net is fully Object Oriented unlike Visual Basic and everything in VB.Net is an object. As it is compliant to the Dot Net Framework VB.Net can make full use of Framework Class Library provided by dot Net Framework.]

    4. Question 4. How Do You Validate Date By Using Which Validation Control?

      Answer :

      <asp:regularexpressionvalidator id="regExpDate"
      runat="server"
      ValidationExpression="^\d{2}[\/-]\d{2}[\/-]\d{2,4}$"
      ErrorMessage="It is not a valid date"
      ControlToValidate="txtpatientvisitdate"
      EnableClientScript="False"
      Display="Dynamic"></asp:regularexpressionvalidator>

    5. Question 5. What Does Vs.net Contains ?

      Answer :

      Visual Studio .Net is basically a framework which makes easy development of codes written in Various programming languages.. It contains two things
      1.Framework Class Library: It contains various classes managed within various namespaces.
      2.Common Language Runtime: CLR is the execution engine which helps in compiling the IL code into machine code,takes care of security issues and many other critical tasks.Web pages, windows apps, console applications, Class libraries are various options which can be created using VS.net.

    6. Question 6. How Do You Rate Yourself In .net ?

      Answer :

      Based on Framework understanding and OOPS Concepts,Use of Different Component Library.

    7. Question 7. What Is Intermediate Language In .net ?

      Answer :

      .net supports CLS i. e. Common language type. its a microsoft’s feature to bring all languages near one roof. When You compile .net code it doesn't converted into binary language, it converted into IL (Intermediate Language) also known as MSIL. And from IL to binary language converted at run time, CLR manages this process. At the runtime also it not converts whole project at time to binary, only converts that part which is going to execute, this the performance of project increases. This IL can use any language which is member of that .net studio. The assemblies (ExE, DLL) are also in IL form. So u can use any EXE or DLL created in vb.net in c#.net also.[which converts native code into byte code i.e machine understandable code.]

    8. Question 8. Is Vb.net Object Oriented? What Are The Inheritances Does Vb.net Support ?

      Answer :

      yes VB.NET ia an object oriented.Vb.net supports all inheritance
      1)single inheritance
      It means Single class inheriting to single child classes
      2)multiple inheritance
      multiple classess inherits to single classes
      3)Multilevel Inheritance
      Single class inherits to one class that class inheritd to single another class
      4)Heirarichal inheritance
      Single class inherits to Multiple classes
      5)Hybrid Inheritance
      Single class inherits to different classess and that classes inherits to one class.

    9. Question 9. Difference Between Vb Dll And Assemblies In .net ?

      Answer :

      Assemblies can contain DLL and EXE both. Different versions of one DLL can be handled by assemblies. They overcome the DLL Hell problem. Assemblies Contain Manifest and Meta Data files. These are the separate files that describes the Assembly and its attributes. VB DLL is inprocess.DLL run with an exe where as DLL are not self executable.
      we can reuse DLLs .DLL are not platform independent If we have more then one Versions of a DLL we can face DLL Hell Problem.

    10. Question 10. How Do You Do Multithreading Application In Vb ?

      Answer :

      VB doesn't support multithreading.
      [Its the fastest and an excellent application provided in VB.net. Due to which many operations can be done without any lapse of time. The system need not wait for an application or any task to get completed, rather it runs simultaneously.]

    11. Question 11. What Are The Types Of Threading Models In Vb.net ?

      Answer :

      There are lot of threading model available, but we focus on Threading models that are common to win32based environments singleThreaded:There is only one thread with in the process,and it is doing all the work for the process.The process must wait for the current execution of the thread to complete before it can perform another action.
      Apartment Threading (Single Threaded Apartment)Apartment threaded means there are multiple threads within the application. In single threaded apartment (STA) each thread is isolated in a separate apartment underneath the process. The process can have any number of apartments that share data through a proxy. The application defines when and for how long the thread in each apartment should execute. All requests are serialized through the Windows message queue such that only a single apartment is accessed at a time and thus only a single thread will be executing at any one time.
      Free Threading (Multi Threaded Apartment)Free threaded applications were limited to programming languages such as C++ until the release of Microsoft .NET. The free threaded/Multi Threaded Apartment (MTA) model has a single apartment created underneath the process rather than multiple apartments. This single apartment holds multiple threads rather than just a single thread. No message queue is required because all of the threads are a part of the same apartment and can share data without a proxy.
      The developer must provide thread synchronization as part of the code to ensure that threads do not simultaneously access the same resources.

    12. Question 12. What Are The Advantage In Vb.net And Different Between Vb And Vb.net

      Answer :

      vb is not follow the oops concept. But vb.net follow the oops concept.
      [Adv of VB.NET
      vb is object based.vb.net is object oriented
      vb use record set for database connection
      vb.net use dataset for database connection]
      [1. VB uses vb runtime while vb.net uses CLR
      2. VB object based,vb.net is object oriented
      3. VB Suports splash screen
      4. VB Uses on error goto while vb.net uses Try.. Catch..Finally
      5. vb.Net Supports inheritance]

    13. Question 13. What Is The Difference Between Web User Control And Web Custom Control?

      Answer :

      web user control: where it predefined attribute functionality where it resides in control library
      web custom control: where it is defined by user itself and store in a custom library
      Web User Controls:
      1) Easy to Create
      2) Limited support for consumers who use visual design tool
      3) A seperate copy of the control is required in each application.
      4)Cannot be added to toolbox in Visual Studio.
      5) Good for Static Layout.
      Web Custom Controls:
      1) Harder to Create
      2) Full support for consumers
      3) Only a single copy of the control is required in the GAC
      4)Can be added
      5) Good for Dynamic Layout.

    14. Question 14. What Is An Indexed Property?

      Answer :

      you include the index parameter in the Property statement. In this example, the test_number parameter is the index for the Scores property.
      Public Class Student
      ' The private array of scores.
      Private m_Scores(9) As Integer
      ' The indexed Score property procedures.
      Public Property Score(ByVal test_number As Integer) As _ Integer
      Get
      Return m_Scores(test_number)
      End Get
      Set(ByVal Value As Integer)
      m_Scores(test_number) = Value
      End Set
      End Property
      End Class

    15. Question 15. What Is Versioning In .net?

      Answer :

      main advantage of .net is versioning and solve very critical problem.
      .net maintain one application with more then one version and also solve DLL HELL problem because it can run same application with different version at a same time[.Net have an Assembly. It gives the Portable Execution file.The main use of assembly is to maintain the Dll and exe's.
      So sometimes the programmer confused to which is modified code.That time the assembly provide the Version.That is called versioning. It is start from 1.0.*,.......]

    16. Question 16. What Is Dll Hell?

      Answer :

      1.Adding of a new virtual method to a class exported from a DLL can cause the following problems:
      -If class already has a virtual method B and we are adding a new one named A before it, then we are changing the table of virtual methods. Now the first virtual method in the table will be A but not B and the client program which calls B will fail without recompilation as the call of B will cause the call of A and this is another method which possibly has other parameters and return type.
      -When a class doesn?t have virtual methods and none of its base classes have, then adding of a new virtual method to it or to its base class will cause adding of the pointer for the table of virtual methods. This will cause change in the class size. So the error will occur after a client program will allocate memory for the class (an amount of memory that was required before the class has been changed) and will try to modify some of the class' fields explicitly or implicitly. In this case, as the pointer to the table of virtual method is added to the beginning of the class, all addresses of the class fields are shifted and thus we will get an abnormal client program behavior or a runtime error.
      -In case when a class has virtual methods or any of its parent classes has, we can’t add virtual methods to classes exported from the DLL if they participate in the inheritance. We can?t add virtual methods not only to the beginning of the class declaration but also to the end of it. The problem is in shifting in the table of virtual methods. Note that even if you add a new virtual method to the end of the class declaration then the child’s virtual methods will be shifted.
      2.Adding of a new field (of any kind) to a class declaration can cause following problems:
      1.Adding of a new field to the end of a class causes class size to change as in the case of adding of a virtual method to a class that didn?t have any. The client program will allocate less memory than it is required for a new class and this will cause referencing to the memory out of the class scope.
      2.Adding of a new field between existing ones is even worse. It will case all addresses of fields after the new one to be shifted and a client application will work with the incorrect addresses while working with the fields that are situated after the new field. We also have the problem as in the previous point here.

    17. Question 17. How Does You Call And Execute A Sp In .net?

      Answer :

      Using command object we can execute a SP. Instead of sql query we have to pass the SP Name.
      [command.connection =connectionstring
      command.commandType=commandType.storedProcedure
      command.commandtext="sp_name"
      command.executenonquery()]

    18. Question 18. Why Datareader Is Useful?

      Answer :

      Data reader is useful when we just want to acccess datas from the database not when we want to perform DML operations. and It is useful when we want to perform forward only reading of datas.It wont requires any large volume of resources in the Front end. [Datareader is read only or forward only. So it is very fast to fetch the data from database.]

    19. Question 19. What Is The Difference Between Dataset And Recordset?

      Answer :

      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.
      [1)With Data set you can retrive data from database like oracle and SQL Server and manage them in one dataset, with recordset this is not possible.
      2)All representation of Dataset is using XML while recordset uses COM.
      3)Recordset can not be transmitted on HTTP while Dataset can be.]

    20. Question 20. How Does You Get Record No From 5 To 15 From A Dataset Of 100 Records?

      Answer :

      dim dRow as data.datarow
      for i as interger = 5 to 15
      drow = dSet.Tables(0).Rows(i)
      'process row
      next i

    21. Question 21. What Is The Difference Between Dataset And Datareader?

      Answer :

      DataReader:
      Datareader is like a forward only recordset. It fetches one row at a time so very less Network Cost compare to DataSet(Fetches all the rows at a time). DataReader is readonly so we cannot do any transaction on them. DataReader will be the best choice where we need to show the data to the user which requires no transaction i.e reports. Due to DataReader is forward only we cannot fetch the data randomly. .NET Dataproviders optimizes the datareaders to handle the huge amount of data.

      DataSet:
      DataSet is always a bulky object that requires lot of memory space compare to DataReader. We can say the dataset as a small database because it stores the schema and data in the application memory area. DataSet fetches all data from the datasource at a time to its memory area. So we can traverse through the object to get required data like querying database.The dataset maintains the relationships among the datatables insideit. We can manipulate the realational data as XML using dataset.We can do transactions (insert/update/delete) on them and finally the modifications can be updated to the actual database. This provides impressive flexibility to the application but with the cost of memory space. DataSet maintains the original data and the modified data seperately which requires more memory space. If the amount of data in the dataset is huge then it will reduce the applications performance dramatically.
       

    22. Question 22. How Do You Declare Static Variable And How It Is Declared And What Is Its Lifetime?

      Answer :

      Static variables are declare through the Static Var1 as Integer The scop of the Var1 is within the module where its is Defined.

    23. Question 23. What Is The Difference Between Overriding And Overloading?

      Answer :

      overloading-------having same method name with different signatures.
      overriding--------methods name and signatures must be same
      [OverLoading : All the method will share the same name but it differes based on the parameter, type of parameter and number of parameter
      Overriding : The method in the derived class the has the same name in the base class and it changes the behaviour or functionality of the method in the base class.]

    24. Question 24. What Is Shadowing?

      Answer :

      When global and local varible in the same name.the local varibale in a mehod or function which use to override the global is called the shadowing.ie the Global varible is being shadowed by the local varible.

    25. Question 25. What Is An Abstract Class?

      Answer :

      It is a class which contains at least one abstract method(A method without any implementation). Other methods can have implementations. This class can not be instantiated. It can always become a base class for other classes.

       

    26. Question 26. What Is The Difference Between Friend And Protected Friend?

      Answer :

      Protected variable will be accessed in inherited class, but instance variable of class cant access protected variable.While friend variable will be accessed in inherited class as well as instance variable of class across the project.Where we need both functionality we are using protected friend scope.
      [Protected --> Accessible ONLY by
      1.Derived classes
      2.Within the same class
      Friend --> Accessible ONLY by
      1.Derived classes
      2.Classes in the same assembly
      3.Within the same class
      Protected Friend --> Accessible ONLY by
      1.Derived classes
      2.Classes in the same assembly
      3.Within the same class]

    27. Question 27. In Order To Get Assembly Info Whcih Namespace We Should Import?

      Answer :

      system.reflection.

    28. Question 28. Columnmapping Belongs To Which Namespaces?

      Answer :

      System.Data.Common.

    29. Question 29. Trace And Debug Belongs To Which Namespaces?

      Answer :

      system.process.diagnostics.

    30. Question 30. What Is The Difference Between Clr & Cts?

      Answer :

      CLR is the common language runtime. which is the feature makes the .net applications to run plantform independent langauge interoperability.
      CTS Common type system is the part of the CLR which enable the Common Datatype system to All the .net languages.it also defines conventions to convert objects from one langauge to another

    31. Question 31. What Is Clr?

      Answer :

      CLR means Common Language Runtime.It is Major component of the .NET frameworkIt provides number of benefits to the developers such as Exception handling,Security,Debugging and Versioning...

    32. Question 32. What Is The Root Namespace For All Types?

      Answer :

      Imports system.

    33. Question 33. What Is The Relation Between Garbage Collector And Finalize And Destructor?

      Answer :

      here the GC calls an object's FINALIZE method immediately before it collects an object that is no longer referred by the application.
      GC doesn’t actually run finalize method when the GC finds a FINALIZE method it queues the obj up for the finalizer to execute the objects method[GC checks for those resources which are no longer used by the process. To release the memory from these resources and in order to regain the memory heap GC initiates destructors to destroy such instances of the program. Before the destructor void an instance variable finalize routine gets executed. This routine performs whatever is to be done before the object return to void state or prior to release of any unused resources.]

    34. Question 34. What Are The Similarities Between Class And Structure?

      Answer :

      -> Both can have constructors, methods, properties , fields, constants , enumerations, events and event
      handlers.
      -> Structure and class can implement interface.
      -> Both of them can have constructor without parameter and with parameter.
      -> Both can have delegates and events.
      [class is a collection of methods functions and properties enumerators and fields.
      structure can be defined as a tool for handling a group of logically related data item.
      the main difference is class is a referance type.structure is a reference value type.]

    35. Question 35. Do Event Have Return Type?

      Answer :

      No. events do not have return type.

    36. Question 36. What Do You Mean By .net Framework

      Answer :

      It is a collection of classes and services.It exists as a layer between.NET applications and underlying operating system.i.e., it encapsulates the basic functionality that was earlier built into programming languages such as debugging and security services.
      [.net framework is a collection of services & classes.it exists as a layer b/w .net applications 7 the underlying operating system.
      .net framework consists of web forms,window forms & console applications that pertain to the presentation layer of the aplication.
      .net framework consists of two other components,the .net framework base classes & common language runtime(CLR).]

    37. Question 37. Is There Any Easy Way To Convert Vb6 Programs To Vb.net?

      Answer :

      Just Open The Vb Project in Visual Studio.Net(File---> Open).

    38. Question 38. What Is The Common Language Runtime?

      Answer :

      CLR means commaon language runtime for the dot net frame work.it is the frame work layer that resides above the operating system and handels/ manages the execution of the .net applications.our .net programs don't directly communicate with the operating system but through CLR.
      OUT .NET APPLICATION--->>CLR--->WINDOWS OS

    39. Question 39. How Is Vb.net Different From Vb6?

      Answer :

      1. VB6 was a scripting language while VB.NET is a Programming language.
      2. VB6 was supported Unstructured error handling by using On Error Gotos tatement. VB.NET supports structured exceptional by using Try…Catch…Finally to handle exceptions at runtime.
      3. VB.NET is completely supports object oriented features.but VB6 wont support.
      4. VB6 used ADO as Data access technology and record-sets to implement data access applications. Also here data transfer in the form of binary format.VB.NET uses ADO.NET and datasets to build data access applications. The ADO.NET also supports the disconnected data access. Here the data transfer in the form of xml format. So here their is faster data transfer.
      5. Multiple versions are supported with VB.NETbut withVB6its not supported.
      6. multithreading is supported with VB.NET, but not with VB6.

    40. Question 40. What Are Fixed Memory Leaks And Threads Locking Problems.

      Answer :

      Memory leak is a bug in the program which uses the memory continuously without releasing it until the system crash.Thread locking problem is nothing but a deadlock situation in case of synchronous process when two consecutive threads get lock on a common resource and waiting for each other to release that. This happens usually in case when the semaphores or monitors are not used.

    41. Question 41. How To Call A List Box On The Text If Some One Send Me The Code For It

      Answer :

      i understood the ? like this what to do if we need to transfer the listbox items to the text if i am correct then my answer to this is double click on the listbox so that the eventof the listbox is displayed in the code editori.e
      private sub listbox1_selectedindexchanged......
      textbox1.text=listbox1.selecteditem.

    42. Question 42. What Is The Difference B/w Readonly Variable And Constant Variable?

      Answer :

      variable used to store the data
      Read only variable:-
      Read only variable means read only but not allow to write
      constant:
      constant variable specify the constant value.

    43. Question 43. What Is The Dif B/w Panel And Groupbox.

      Answer :

      Both panel and group box acts like a container to other controls they help us a lot in some applications where we want a group of controls or objects should be disabled or enabled when a specific task is performedthe main difference is group box has a hording where u can place a text of ure own whereas a panel is just like a frame what we used in VB but has a scrollbar(hs,vs)

    44. Question 44. What Do You Mean By 'option Strict On' ?

      Answer :

      Option Strict
      Visual Basic language in general does not require explicit syntax to be used when performing operations that might not be optimally efficient (e.g. late binding) or that might fail at run time (e.g. narrowing conversions). This permissive semantics often prevents detection of coding errors and also affects the performance of the application.
      VB.NET enables a programmer to enforce strict semantics by setting this option to "On". When used, this option should appear before any other code. This option can be set to "On" or "Off". If this statement is not specified, by default, it is set to "Off".
      Syntax: Option Strict [On / Off]
      When it is set to "On", it disallows any narrowing conversions to occur without an explicit cast operator, late binding and does not let the programmer omit "As" clause in the declaration statement. Since setting it to "On" requires explicit conversion, it also requires that the compiler be able to determine the type of each variable. Thus it is implied that Option Strict also means Option Explicit.
      Visual Basic .NET allows implicit conversions of any data type to any other data type. However, data loss can occur if the value of one data type is converted to a data type with less precision or a smaller capacity. Setting this option to "On" ensures compile-time notification of these types of conversions so they may be avoided.

    45. Question 45. What Are Jagged Arrays ?

      Answer :

      a collection of discrete no of elements in each and every row is called as jagged arrays.
      1)these jagged arrays doesn’t contain columns,
      2)a jagged array also called as dynamic array
      3)jagged array is a collection of dynamic arrays
      4)these are faster and also save the memory.
      syntax of jagged array:
      int[][]x=new int [rows][]
      here x is array name

    46. Question 46. What Are Satellite Assemblies?

      Answer :

      Satellite assemblies are user for localizing the applications resources. A satellite assembly is a DLL that contains only resource strings.we typically have one satellite assembly DLL for each language. Because these satellite assembly DLLs are separated from the main assembly (an .exe or DLL), it is easier to drop in.

    47. Question 47. Multi-language Support As We Progress In Your Development Process. How Can We Remove Handlers At Run Time ?

      Answer :

      RemoveHandler myobj.myEvent, AddressOf MyEventHandler.

    48. Question 48. What Is .net

      Answer :

      .Net is the Development Plateform which provides advanced feature facilities for the web and window application along with the window services . The .Net is the Middle layer between the operating System and the .Net application .The feature of .Net that the .Net Component can talk with each other without worrying about the language in which they are originally.. Two main components are CLR stands for the common Language Runtime and the .Net FrameWork Base classes. The CLR performs the task of converting the IL to native code Which gives the .Net applications to be language Independent . The Other component Like .Net FramwWork Base Classes act as services to be provided to the .Net applications.

    49. Question 49. Can Any Body Tell Me The Code Procedure For Preparing Parameterized Cristel Reports.the Report Should Be Generated By Taking To Or More Parameters. Example: Report Should Be Genarated From Date To Todate?

      Answer :

      We can generate Crystal Report by using date parameter, but the date format should be "yyyy,mm,dd".
      Ex.CrystaReport1.SelectionFormula = "{GLNOTE.L_DT}=date(" & a & ")"
      The variable 'a' should be assign with formated date.

    50. Question 50. Please List Some Final Year Projects That Can Be Done Using Vb.net In The Application Level.

      Answer :

      You can go for internet control of robot.
      1. use chips:- at89c51 microcontroller, l293d motor driver n max232 converter (for robot)
      2. using vb.net, develop the gui n use winsock programming for sending photos on internet.
      3. use mscomm programming in .net to move the robot in a wired connection with the comp.
      4. u can also use Enbedded C for microcontroller programming in place of assembly.use keil compiler for that n its available for free on internet.
      5. attach a cam to robot, move it n transfer the photos captured to the client over internet.

    51. Question 51. How Can We Get The Contents Information That Are Displayed In A Web

      Answer :

      browser control in vb.net.

    52. Question 52. Suppose If We Display The "c:\" Or "d:\" Of The Computer In A Web Browser And We Want To Get Any Folder Details But Not Ny Rigth Clicking The Folder. How To Do That Plz Help

      Answer :

      I think you want the openfiledialog, unless your saving, then savefiledialog. Add one to your project. the simplest usage allowing you to use in any fashion would be
      Dim OPEN as New Openfiledialog
      open.showdialog()
      then when you hit open on the dialog, you can pass that information such as
      Dim a as string
      a = open.filename()
      a will then = D:/Filename.smt, or whatever its real directory is Ofcourse there more recomended approaches to this method, but that should get you somewhere.

    53. Question 53. What Is The Base Class Of .net?

      Answer :

      System.Object is the base class of .NET
      It Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate superclass of all classes in the .NET Framework; it is the root of the type hierarchy.

    54. Question 54. Whats The Difference Bt. .dll Extension And .exe Extension Files?

      Answer :

      DLL : It is an inprocess server and runs in the same memory space as client application. Problem with dll is if any error comes in dll, whole application gets crashed.
      Exe : It is an out of process server and rus as independent application in seperate memory. If error comes in exe, it does not affact the client application.

    55. Question 55. How To Send Xml File On Server Using Http Protocol?

      Answer :

      Through SOAP Protocol.

    56. Question 56. How A Rotate A Control (rotation Like Shapes Are Rotated In Ms Powerpoint ) In Vb.net?

      Answer :

      we can use adrotator control to use like powerpoint presentation.

    57. Question 57. How Can I Extract The Formated Word(bold,italic,underline,font,color Etc) From The Msword File.?

      Answer :

      using CommonDialog class
      eg:
      the code to invoke the default font dialog box by using the FontDialog control is given below:
      private sub displayfont_click(byval sender as system.object, byval e as system.eventargs) handles displayfont .click fontdialog. showDialog()
      textbox1.font=fontdialog1.font
      end sub
      the code to invoke the default font dialog box by instantiating the fontdialog class is:
      dim fdialog as new fontdialog()
      private sub displayfont_click(byval sender as system.object,byval e as system.eventargs) handles displayfont. click fdialog. showDialog()
      textbox1.font=fontdialog1.font
      end sub

    58. Question 58. Differences Between Vb.net And C#, Related To Oops Concepts?

      Answer :

      1. C# uses Must not Inherit, VB.Net uses sealed class
      2. C# uses Internal, VB.Net uses Friend
      3. VB.Net uses with events and end events
      4. C# uses abstract and VB.Net uses Must Inherit

    59. Question 59. Can U Able To Get The Xml Document In Crystal Report If Yes How Its Possible?

      Answer :

      Yes. You have to convert XML to dataset.

    60. Question 60. What Is Different Between Web.config And Machine.config And Where It Will Be ?

      Answer :

      The ASP.NET Web.config file is used to define the configuration settings for an ASP.NET application. ASP.NET and the .NET Framework use .config files to define all configuration options. The .config files, including the ASP.NET Web.config file, are XML files. The ASP.NET application configuration settings can be changed by creating a file called Web.config and saving it in the root folder of the application.This is how the minimal Web.config file should look like:
      <!--?xml version="1.0" encoding="utf-8" ?>
      <configuration>
      <system.web>
      </system.web>
      </configuration>
      The first line of the Web.config file is the same as the first line for any .config file and specifies that this is an XML document with utf-8 character encoding type.
      There are 2 important characteristics of the Web.config file. The first one is that if you change your Web.config file, you don?t need to re-compile your ASP.NET application.
      The second one is that the Web.config file cannot be viewed in directly in a browser.
      Server-wide configuration settings for the .NET Framework are defined in a file called Machine.config. The settings in the Machine.config file can be changed and those settings affect all .NET applications on the server.what if the Machine.config file defines different settings than the ones defined in your Web.config file? The settings in the Web.config file override the settings in the Machine.config file.
      [A web.config file is used to configure one asp .net web application. Each Asp.net application has a web.config file. A Machine.config file is used to configure the applications in a particular machine. Configuration done in machine.config file is affected on any application that runs on a particular machine.]

    61. Question 61. How To Store And Retrieve Images In Sql Server Database Through Vb.net?

      Answer :

      To store image in database 1st u need to make table like this
      CREATE TABLE PicImage
      (
      Picid int,
      Pic Image
      )
      Now in vb.net coding u have to write code like this
      Dim ms As New MemoryStream
      pic_photo.Image.Save(ms, pic_photo.Image.RawFormat)
      arrImage = ms.GetBuffer
      ms.Flush()
      Now pass arrImage in ur insert query.

    62. Question 62. What Is The Difference Between Vb And Vb.net ?how To Insert Row By Row Data In Datagrid ? How To Work With Repeater Controls And Give Small Example Program ?

      Answer :

      1.Visual Basic.NET is object oriented but VB 6 is not so.
      2.Visual Basic.NET supports multi threading but VB doesnt support.
      3.Visual basic.NET supports Managed Code extensions but VB doesnt support.
      4.Both Vb and VB.NET support command line programs.
      5.Both VB and VB.NET support COM and COM+ applications.
      6.VB.NET is strongly typed but VB is not so.
      Dim cn As SqlConnection
      Dim cmd As SqlCommand
      Dim dr As SqlDataReader
      Dim table As New DataTable
      constructor
      initialze the cn object like eg
      cn = new
      sqlconnection("server=name;database=name;uid=name;pwd=name;")
      write it in the button .click event that add the table dynamicaaly created to datagrid
      Try
      cmd = New SqlCommand
      cmd.CommandType = CommandType.Text
      cmd.Connection = cn
      cmd.CommandText = "select * from manas"
      cn.Open()
      dr = cmd.ExecuteReader()
      Dim i As Integer
      For i = 0 To dr.FieldCount - 1
      table.Columns.Add(i)
      Next
      Dim row As DataRow
      While dr.Read()
      row = table.NewRow()
      For i = 0 To dr.FieldCount - 1
      row(i) = dr(i)
      Next
      table.Rows.Add(row)
      End While
      DataGrid1.DataSource = table
      Catch ex As Exception
      MsgBox(ex.Message & ex.StackTrace)
      Finally
      cn.Close()
      dr.Close()
      End Try

    63. Question 63. You Want That A Component Be Granted Full Access To The Active Directory Before It Is Loaded. Which Attributes Should You Use With The Component?name Some Of The Asp Components?

      Answer :

      • Ad Rotator component – a way to manage advertisements on the web site.
      • Content Linker component – a technique to direct users through a set of pag

    64. Question 64. How To Check For A Particular Record Whether It Is Present Or Not In Dataset

      Answer :

      if the record is not present i want to display a message as no records what is the code for checking
      if you are using "DataReader" then
      if DataReaderName.HasRows then
      statements
      else
      statements
      end if
      if you are using "DataSet" then
      if DataSetName.TABLES.("tablename").ROWS.COUNT=0 THEN
      statements.
      end if

    65. Question 65. I Was Asked In Interview That If I Have Created A Class And I Don't Want The Class To Be Inherited By Any Other Members Without Me Which Key Or Function I Have To Use?

      Answer :

      VB: for class NotInheritable [MyClass]
      For method: NotOverridable [MyMethod]
      C# For class or method :sealed[MyClassMyMethod]{}

    66. Question 66. How To Store/retrive Images Into/from Oracle Database Using Vb.net ?

      Answer :

      Code for storing Image

      Dim rs As New ADODB.Recordset
      Dim mstream As New ADODB.Stream
      rs.Open "select * from StyleImage where styleNo='" & TxtStyleNo.Text & "'", db, adOpen Dynamic, adLock Optimistic
      If rs.EOF = False Then
      MsgBox "Stle Already Exist in Database"
      Exit Sub
      End If
      db.Execute "exec insertintostyleimage " & MCId & "," & SCId & "," & GId & "," & CompanyId & ",'" & TxtStyleNo & "','" & TxtStyleDesc & "','" & TxtStyleCost & "','" & Img1.Picture & "','" & Usercd & "','" & Img2.Picture & "','" & cmbexportername.Text & "','" & txtexporterstyleno.Text & "'" rs.Open "select * from StyleImage where styleNo='" & TxtStyleNo.Text & "'", db, adOpenDynamic, adLockOptimistic
      With rs
      If .RecordCount <> 0 And Img1.Picture <> LoadPicture("") And Img2.Picture <> LoadPicture("") Then
      mstream.Type = adTypeBinary
      mstream.Open
      fpath = CD1.FileName
      mstream.LoadFromFile fpath
      .Fields("imagefilebig").Value = mstream.Read
      fpath = CD2.FileName
      mstream.LoadFromFile fpath
      .Fields("imagefilesmall").Value = mstream.Read
      .Update
      mstream.Close
      End If
      .Close
      End With

      code for retriving images

      Dim rscat As New ADODB.Recordset
      Dim mstream As New ADODB.Stream
      rscat.Open "select style image.*,
      (select company name from exporter 
      where companyid=styleimage. exporterid)as expname
      from styleimage where companyid=" & CompanyId & "
      and maincatid=" & MCId & " and subcatid=" & SCId & "
      and catgroupid=" & GId & " and styleno='" & 
      CmbStyleNo & "'", db, adOpenDynamic, adLockOptimistic
      If rscat.RecordCount > 0 Then
      mstream.Type = adTypeBinary
      Set Img2.Picture = LoadPicture("")
      If mstream.State = 1 Then mstream.Close
      mstream.Open
      If IsNull(rscat.Fields("Imagefilesmall")) Then
      Else
      mstream.Write rscat.Fields("Imagefilesmall").Value
      If mstream.Size > 1 Then
      mstream.SaveToFile App.Path & "temp.jpeg", adSaveCreateOverWrite
      CD1.FileName = App.Path & "temp.jpeg"
      Img2.Picture = LoadPicture(CD1.FileName)
      mstream.Close
      End If
      End If

    67. Question 67. What Is Sta In .net?

      Answer :

      single-threaded apartments (the apartment model process) offers a message-based paradigm for dealing with multiple objects running concurrently. It enables you to write more efficient code by allowing a thread, while it waits for some time-consuming operation to complete, to allow another thread to be executed.

      Each thread in a process that is initialized as an apartment model process, and that retrieves and dispatches window messages, is a single-threaded apartment thread. Each thread lives within its own apartment. Within an apartment, interface pointers can be passed without marshaling, and therefore, all objects in one single-threaded apartment thread communicate directly.

      A logical grouping of related objects that all execute on the same thread, and therefore must have synchronous execution, could live on the same single-threaded apartment thread. However, an apartment model object cannot reside on more than one thread. Calls to objects in other processes must be made within the context of the owning process, so distributed COM switches threads for you automatically when you call on a proxy.

    68. Question 68. How Would You Implement Inheritance Using Vb.net ?

      Answer :

      Using VB.NET we can create a class that provides basic functionality so that other classes can inherit its members. VB.NET provides the 'Inherits' keyword to implement inheritance. By using the keyword 'Inherits' we can inherit the characteristics of a class into another class.

    69. Question 69. What Is Assembly In .net And What Do You Mean By Protected Class Always Present In The Same Assembly?

      Answer :

      Assemblies are building blocks of framework. There are mainly two types of assemblies
      a) Private Assembly
      b) Shared Assembly

    70. Question 70. What Is The Diff Between Vb Mdi Form And .net Mdi Form?

      Answer :

      In VB MDI form is created by adding MDI Form to the project and adding child forms by setting MDICHILD property of the child form. In .NET there is no MDI form, any form can be made a MDI parent by setting IsMdiContainer property to TRUE.
      Furthermore, there are changes in the properties, methods and basic behavior of the MDI Forms, like ability to set Background Color is not available in .NET, ability to add controls to MDI form(although they don't behave properly), ActiveForm to ActiveMdiChild, Arrange method to LayoutMdi, etc.

    71. Question 71. What Is The Advantage Of Option Strict On?

      Answer :

      Visual Basic allows conversions of many data types to other data types. Data loss can occur when the value of one data type is converted to a data type with less precision or smaller capacity. A run-time error occurs if such a narrowing conversion fails. Option Strict ensures compile-time notification of these narrowing conversions so they can be avoided.
      In addition to disallowing implicit narrowing conversions, Option Strict generates an error for late binding. An object is late bound when it is assigned to a variable that is declared to be of type Object.
      Because Option Strict On provides strong typing, prevents unintended type conversions with data loss, disallows late binding, and improves performance, its use is strongly recommended.

    72. Question 72. What Do You Mean By Serialization And Deserialization And It's Use.

      Answer :

      Serilization: It is the process of maintaning object state in the form of a stream.
      Deserilization: It is the process of reading the stream and construct the object.
      Uses:(Remoting Concept)
      1) making object state persistent
      2) transmitting the object from one system to another system.

    73. Question 73. What Is Misl Code?

      Answer :

      MSIL code is the Microsoft Intermediate Language. This is the code created by the CLR from the source code. This MSIL code is converted to machine/native code by JIT compiler. This machine code is actually the code which runs.

    74. Question 74. What Is The Difference Between A "jagged Array" And Multidimensional Array" ?can Anyone Show Me It Practically ?

      Answer :

      multidimentional array has same size in all dimentions but jagged is the type of multidimentional array which has different size for its dimensions.

      int array[3][3][3]; //multidimentional array.
      int array[3][1][6]; //jagged array.

    75. Question 75. What Is The Exact Defination Of "object"?

      Answer :

      A real world entity which has some specific attributes related to its characteristics and operations or methods associated with its attributes.

    76. Question 76. How Do You Use Two Datareaders At The Same Time In A Vb.net Windows Application ?

      Answer :

      for example:
      while(datareader1.read())
      while(datareader2.read())
      end while
      end while
      this is not allowed even though both datareaders have two different sets of data.

    77. Question 77. What Are The Difference Between Dispose(), Close(), Exit(), End()? When Do We Use Them?

      Answer :

      dispose(): should release all the resources that it owns.
      close():closing the application
      exit():Exiting from the loop
      end():stops the execution of the page/function/procedure

    78. Question 78. What Is The Purpose Of Using Executenonquery?

      Answer :

      System.Data.OleDB
      It contains the objects that we use to connect to a data source via an OleDB provider , such as OleDb
      Connection, 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.

    79. Question 79. What Is The Advantage Of Packaging Over Xcopy In .net?

      Answer :

      Xcopy technique is to simply copy your web application files to the production server hard drive and set a virtual directory there. The setting of a virtual directory is needed by several deployment schemes and can be achieved from Internet Information Manager Microsoft Management Consol.

      It's always desirable to package your web applications such that they are easy to deploy on the production server then the traditional xcopy in which the developers have to use the command line.

    80. Question 80. What Is The Difference Between Datatable And Dataset?

      Answer :

      Data table is a collection of record's that consist the single table Whenever dataset is collection of data table and it is provide interface between database and datatable 1 dataset consist multiple table.

    81. Question 81. What Is The Size Of .net Object?

      Answer :

      Default size when a class gets loaded in memory is 8 bytes.

    82. Question 82. What Is The Significance Of Delegates. Where Should They Be Used? What Are The Situations Where We Require Them?

      Answer :

      Delegates are used as pointer to hold the controls actually i used the delegates when there is problem in VB.Net 2005 where each control is already threaded, to use my personla thread on these control i used delegates
      Ex:
      Private Delegate Sub dd()
      Dim d1 As New dd(AddressOf c1)
      Dim t1 As New Threading.Thread(AddressOf thread1)
      public sub Thread1()
      r1 =
      Me.Label1.BeginInvoke(d1)
      Me.Label1.EndInvoke(r1)
      end sub
      Public Sub c1()
      Me.Label1.Text = ct1
      Me.Label1.Refresh()
      End Sub

    83. Question 83. What Make .net A Language Independent Platform Options Are: 1. Msil 2. Il 3. Clr 4. Jit

      Answer :

      All options i.e MSIL/IL, JIT and CLR.

      CLR(Common Language Runtime): CLR represents runtime environment of .Net which is responsible for executing .Net program on the production PC. It converts MSIL / IL code to native / machine understandable code by the help of its complier known as JIT. MSIL / IL(Microsoft Intermediate Language): .Net language compliers generates IL code which is managed code as it is managed by .Net (CLR).

      JIT : Â .Net (CLR) compiler the complies IL code into machine code.

    84. Question 84. What Is The Difference Between Manifest And Metadata?

      Answer :

      Manifest and metadata are 2 parts of assembly architecture.
      Manifest is used for storing AssemblyName, AssemblyTitle,publicKey.
      Metadata contains Namespaces, Classes.

    85. Question 85. What Is The Use Of Console Application?

      Answer :

      Console Applications are command-line oriented applications that allow us to read characters from the console, write characters to the console and are executed in the DOS version. Console Applications are written in code and are supported by the System. 

    86. Question 86. How Vb Implements The Disconnected Architecture As Like Vb.net?

      Answer :

      In VB to implement a disconnected recordset, after you have filled the recordset with the data, set its active connection property to “Nothing”. That breaks the connection to the database. You can locally also save the data of the recordset by using its Save function.

    87. Question 87. What Is The Difference Between .dll Extension And .exe Extension Files?

      Answer :

      The main difference between .dll and .exe is
      .dll is the in process component where it take up the client’s memory space to run. So the communication between the application and component (dll) is very fast.
      .EXE is the Out of process component. It uses its own memory (not application memory) to run the component. The communication between the application and component is slow when compared to .dll

    88. Question 88. What Is Different Between Web.config And Machine.config And Where It Will Be?

      Answer :

      The settings made in the web. config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net application.

    89. Question 89. Differences Between Vb.net And C#, Related To Oops Concepts?

      Answer :

      VB.NET is a windows application where as C# is a console.

    90. Question 90. What Is Non_deterministic Finalization?

      Answer :

      The Finalize method is actually executed by the runtime on a special thread allocated by the Garbage Collector (GC).The Finalize method is executed whenever the runtime feels it is appropriate, such as when a low-resource condition occurs and this situation is often referred to as non-deterministic finalization.

    91. Question 91. How Do You Define A Read Only Properly In A Class Module?

      Answer :

      Public Class YourClass
      Private yourName As String
      Private yourNumber As Decimal
      Public Sub New(breed As String)
      yourName = breed
      End Sub
      Public ReadOnly Property Name() As String
      Get
      Return yourName
      End Get
      End Property

    92. Question 92. What Is The Source Code For Display The Picture In Button Click Event?

      Answer :

      PictureBox1. Image = Image.FromFile(”C:olympicsO8_basketball .gif”)

    93. Question 93. What Do You Mean By Option Strict On?

      Answer :

      Option Strict On will restrict the implicit type casting (defalut is off in vb,net)

    94. Question 94. What Are Jagged Arrays ?

      Answer :

      Jagged array is an array inside an array is called a jagged array.

    95. Question 95. How Can We Remove Handlers At Run Time?

      Answer :

      Remove Handler myobj.myEvent, AddressOf MyEventHandler.

    96. Question 96. Write The Role Of New Keyword?

      Answer :

      New is used to initialize a new object. We sets a variable to any datatype 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.

    97. Question 97. What Is Branching Logic Control In Vb.net?

      Answer :

      Function and subroutines are the answer. The difference in two of them is function send information back from where it is called means function can return a value but subroutines cannot do this.

    98. Question 98. What Is Datatype Conversion In Vb.net?

      Answer :

      Convert one variable type to another one is called datatype conversion we can also called this casting in VB.NET some automatically conversion is also there.
      Cbool CByte CChar Cdate CDec CDbI Cmi CLng CObj CShort CSng CStr CType Asc.

    99. Question 99. Explain About The Ruby Interface Generator?

      Answer :

      Ruby interface generator is primarily responsible for providing the visual part of the Visual basic and this was clubbed with “EB” designed for Omega database system. VBX interface was added to this feature which had the ability to load dynamic link libraries.

    100. Question 100. Explain About The Feature Anonymous Type?

      Answer :

      Anonymous type is a feature of VB.NET and it allows data types to be created from the code which requires it. This feature is present in VB as well as C#. They should be stored in variables declared with the keyword VAR Dynamic typing is different and shouldn’t be confused with Anonymous type.

    101. Question 101. Which Is The Tool Which Can Convert Visual Basic Old Version To .net Compatibility Version?

      Answer :

      There is a tool available which can convert old visual basic functions into new .NET code. Artin soft Visual basic upgrade Companion is very useful in converting V13 code into NET code. This tool was developed by Artin. This tool is integrated in Visual studio.NET 2005. It handles programs such as structured handling, error handling, etc.

    102. Question 102. What Would You Do To Remove Microsoft Visual Basic Name Space?

      Answer :

      .NET has many new features and application supportive tools. To remove Microsoft visual basic name space all you have to do is to
      1) Remove the import manually every time you start the project.
      2) Creating a template which does not contain Microsoft Visual Basic namespace.
      3) About new features and changes names you can refer to MSDN.

    103. Question 103. Explain About The Keyword Must Inherit?

      Answer :

      This keyword prevents a class from directly instantiated. This keyword forces users to create references to only derived classes. This keyword is present in C# as abstract and it is very useful in creating applications.

    104. Question 104. Name Some Of The Features Of C# Which Are Not Present In Vb.net?

      Answer :

      Some of the features which are not present in VB are as follows they are: -
      1) It supports unsafe code blocks for improved performance.
      2) Partial interfaces and anonymous methods.
      3) Multi line comments and static classes. Etc

    105. Question 105. Name A Feature Which Is Common To All .net Languages?

      Answer :

      There is only one feature which is common to all languages and that is Garbage collection or GC. This feature is automated which relieves developers of much work. This garbage is disposed only when there is need of memory or stress for memory. GC feature halts the application for few seconds before restarting it.

    106. Question 106. Name And Explain Some Of The Exclusive Features Which Are Present In Vb?

      Answer :

      Some of the features which are exclusive to VB are as follows: -
      1) Name space can be hidden which can be disabled.
      2) Certain project files can be hidden and a user can show them if he intends to do.
      3) Lots and lots of shortcuts are present which ease the development of programs.
      4) Using the AddressOf myObject function a delegate can be made.

    107. Question 107. Explain About Visual Basic.net Culture?

      Answer :

      VB was always a RAD tool and it was always user friendly for any type of user whether professional or not. It also provided many users with shortcuts and features which made this language popular among many users. It had its share of debugging and maintenance issues of course.

    108. Question 108. Compare C# And Visual Basic.net?

      Answer :

      .NET Frame work includes two languages which are language to IL compilers and in this C# and VB.NET are provided. The importance and flexibility of these as better programming languages is still questionable. Visual basic has been updated and revised to make it object oriented whereas C has concepts from many languages such as Delphi, Java. etc and syntax from C and Java.

    109. Question 109. Explain About The Performance Of Visual Basic?

      Answer :

      Visual basic 5 and 6 are efficient in coding the code to native or P-code depending upon the programmer. Portability is a major addition to the performance of VB.NET and the code is also small. Additional layer is provided which interprets the code and this can be avoided by using special algorithms and native code programming.

    110. Question 110. What Are The Various Open Source Tool Available For Vb.net?

      Answer :

      When compared with the rapid development of open source tools for other languages from Microsoft (C#, dc) we can say that development of tools for VB has been slow. Mono development platform is one which is implementing VB libraries and is working on a compiler.

    111. Question 111. Describe About Visual Basic.net?

      Answer :

      This is used in conjunction with Microsoft NET platform and is a successor to visual basic sixth version. Visual basic is used in conjunction with.NET Framework. This tool has a serious defect it is not compatible with Microsoft visual basic sixth version. It has a huge library which assists programmers.

    112. Question 112. Explain Briefly About Rapid Application Development Tool?

      Answer :

      Rapid action development tool describes about the software development process. This tool gives flexibility in iterative development and prototype deployment. It enhances the speed of application development. It is also used for application maintenance.

    113. Question 113. Name Some Of The Features Present In Vb 2005?

      Answer :

      Some of the features present in VB 2005 are as follows: -
      *Edit and continue: It allows developers to modify and execute applications almost simultaneously.
      *Namespace: - This provides access to various parts of the NET framework and it also dynamically generates classes.
      *Data source binding function is very useful for client server development.

    114. Question 114. Explain About .net?

      Answer :

      .NET is a Microsoft Framework and a software component. . NET has a large library of pre-coded solutions which provided developer significant help in developing applications with solutions already present. It offers reliable security and cross platform compatibility.

    115. Question 115. Explain About Visual Basic?

      Answer :

      Visual basic is associated with the IDE of Microsoft. It is basically useful to implement RAD of GUI Creation of Active X scripts are very easy and efficient through VB. Windows API can also be used to create application on windows desktop and its applications. This was primarily designed to create applications for windows platform.

    116. Question 116. Why Is It Not A Good Idea To Insert Code Into Initializecomponent Method When Working With Visual Studio?

      Answer :

      The designer will likely through it away, most of the code inside lnitializeComponent is auto-generated.

    117. Question 117. How Do You Inherit From A Class In C#?

      Answer :

      Place a colon and then the name of the base class. Notice that it’s double colon in C++.

    118. Question 118. Whats The C# Equivalent Of C++ Catch (...), Which Was A Catch-all Statement For Any Possible Exception?

      Answer :

      A catch block that catches the exception of type System. Exception. You can also omit the parameter data type in this case and just write catch {}.

    119. Question 119. How Can You Sort The Elements Of The Array In Descending Order?

      Answer :

      By calling Sort() and then Reverse() methods.

    120. Question 120. What Happens When You Encounter A Continue Statement Inside The For Loop?

      Answer :

      The code for the rest of the loop is ignored, the control is transferred back to the beginning of the loop.

    121. Question 121. Can You Create Enumerated Data Types In C#?

      Answer :

      Yes.

    122. Question 122. Whats The Difference Between Const And Readonly?

      Answer :

      The readonly keyword is different from the const keyword. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used. Also, while a const field is a compile-time constant, the readonly field can be used for runtirne constants as in the following example:

      public static readonly uint [] = (uint) DateTime,Now.Ticks;

    123. Question 123. What Is The Difference Between An Xml "fragment" And An Xml "document" ?

      Answer :

      An XML fragment is an XML document with no single top-level root element To put it simple it is a part (fragment) of a well-formed xml document. (node) Where as a well- formed xml document must have only one root element.

    124. Question 124. How Would You Implement Inheritance Using Vb.net/c#?

      Answer :

      When we set out to implement a class using inheritance, we must first start with an existing class from which we will derive our new subclass. This existing class, or base class, may be part of the NET system class library framework, it may be part of some other application or NET assembly, or we may create it as part of our existing application. Once we have a base class, we can then implement one or more subclasses based on that base class. Each of our subclasses will automatically have all of the methods, properties. and events of that base class including the implementation behind each method, property, and event. Our subclass can add new methods, properties, and events of its own - extending the original interface with new functionality. Additionally, a subclass can replace the methods and properties of the base class with its own new implementation - effectively overriding the original behavior and replacing it with new behaviors.

      Essentially inheritance is a way of merging functionality from an existing class into our new subclass. Inheritance also defines rules for how these methods, properties, and events can be merged. In VB.NET we can use implements keyword for inheritance, while in C# we can use the sign (:: ) between subclass and baseclass.

    125. Question 125. Explain The Differences Between Server-side And Client-side Code?

      Answer :

      Server side code executes on the server. For this to occur page has to be submitted or posted back. Events fired by the controls are executed on the server. Client side code executes in the browser of the client without submitting the page.

      e.g. In ASP.NET for webcontrols like asp:button the click event of the button is executed on the server hence the event handler for the same in a part of the code-behind (server-side code). Along the server-side code events one can also attach client side events which are executed in the clients browser i.e. javascript events.

    126. Question 126. In Vb.net How To Connect Crystal Report?

      Answer :

      Click on solution explorer window right click and add to add new item. The window will be displaced select the crystal reports we have save in any name but extension is used .rpt eg:sss.rpt.

    127. Question 127. When We Will Use Console?

      Answer :

      Console is used only for web application.

    128. Question 128. What Are The Objects In Asp.net And Tell The Purpose Of Those Objects?

      Answer :

      Here are 5 objects in asp.net

      1. Response: This object is to response to other e.g.
      2. Request: This object is request from server.
      3. Application: This object is store global information of application.
      4. Session: This object used store the values into variable.
      5. Server.

    129. Question 129. How To Create Crystal Report In Vb.net With Coding?

      Answer :

      Just configure the report data source by database.

Vb.net Tutorial

Vb.net Interview Questions

Vb.net Practice Tests

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

VB.NET Tutorial