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.
Posted Date:- 2021-09-21 05:36:34
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.
Posted Date:- 2021-09-21 05:35:56
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.
Posted Date:- 2021-09-21 05:35:14
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.
Posted Date:- 2021-09-21 05:34:33
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
Posted Date:- 2021-09-21 05:33:55
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.
Posted Date:- 2021-09-21 05:29:24
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
Posted Date:- 2021-09-21 05:28:48
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
Posted Date:- 2021-09-21 05:27:48
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.
Posted Date:- 2021-09-21 05:27:10
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.
Posted Date:- 2021-09-21 05:26:36
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.
Posted Date:- 2021-09-21 05:26:00
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.
Posted Date:- 2021-09-21 05:24:32
RemoveHandler myobj.myEvent, AddressOf MyEventHandler.
Posted Date:- 2021-09-21 05:23:49
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).
Posted Date:- 2021-09-21 05:23:14
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.
Posted Date:- 2021-09-21 05:22:35
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.
Posted Date:- 2021-09-21 05:22:08
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.
Posted Date:- 2021-09-21 05:21:40
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
Posted Date:- 2021-09-21 05:21:01
Just Open The Vb Project in Visual Studio.Net(File---> Open).
Posted Date:- 2021-09-21 05:20:11
-> 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.]
Posted Date:- 2021-09-21 05:19:37
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...
Posted Date:- 2021-09-21 05:18:48
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
Posted Date:- 2021-09-21 05:17:54
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]
Posted Date:- 2021-09-21 05:17:16
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.
Posted Date:- 2021-09-21 05:16:32
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.
Posted Date:- 2021-09-21 05:15:53
Static variables are declare through the Static Var1 as Integer The scop of the Var1 is within the module where its is Defined.
Posted Date:- 2021-09-21 05:15:25
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.
Posted Date:- 2021-09-21 05:14:55
im dRow as data.datarow
for i as interger = 5 to 15
drow = dSet.Tables(0).Rows(i)
'process row
next i
Posted Date:- 2021-09-21 05:14:17
A Deep copy refers to the creation of a new object and then copying the fields that are non-static of the current object to the new object.
Posted Date:- 2021-09-21 05:11:03
Value types are used for storing the data directly and it will be allocated to the stack. Reference types will be storing a reference to the value’s memory address and will be allocated to the heap.
Posted Date:- 2021-09-21 05:10:06
The .NET framework is flexible and compatible to provide the security features in order to secure code from unauthorized users. There are two different types of security in .NET. They are:
<> Role-based security: Responsible for authorizing the user
<> Code access security: Ensures to provide protection to the system resources from the unauthorized calls
Posted Date:- 2021-09-21 05:09:41
The Async keyword in VB.Net is used for indicating that the lambda expression or the method that it modifies is said to be asynchronous. Such methods are called as async methods. The caller of an async method is allowed to resume its work without waiting for the async method to complete.
Posted Date:- 2021-09-21 05:09:05
Authentication is referred to the process of obtaining the credentials (Usernames and passwords) from the users and verify the user’s identity. Authorization is the process of providing access to authenticated resources. Authentication leads to Authorization. There are three types of Authentication and they are:
1. Windows Authentication
2. Forms Authentication
3. Passport Authentication
Posted Date:- 2021-09-21 05:08:24
Net generally is flexible to provide its support for the implicit conversion of any data type. To ensure that the data loss does not take place during the data type conversion, Option Strict keyword is used. It makes sure of the compile-time notification of the different types of conversions.
Option Explicit is the keyword that is specifically used in a file in order to explicitly declare all the variables by using declare keywords like Public, Dim, Private or Protected. If an undeclared variable name is included, an error will definitely occur during the compile time.
Posted Date:- 2021-09-21 05:07:23
There are different types of threading models that are available, let us look into the Threading models that are common to win32 based environments.
SingleThreaded: It includes only one thread within the process, and it is responsible for performing all the work for the process. The process must be patient to wait for the completion of the current execution of the thread before it can start performing another action.
Apartment Threading (Single Threaded Apartment): Apartment threading includes multiple threads within the application. In a single-threaded apartment (STA), each thread is associated in a separate apartment under the process. The process can have various numbers of apartments that are capable of sharing the data through a proxy. The application will be defining when and for how long the thread in each apartment should perform the execution. All the requests will be serialized through the Windows message queue such that only a single apartment is allowed to be accessed at a time and thus only a single thread will be executed at any one time.
Free Threading (Multi-Threaded Apartment): Free threaded applications are specifically limited to the different programming languages such as C++ until the release of Microsoft .NET. The free threaded/Multi-Threaded Apartment (MTA) model has a single apartment created under a process rather than multiple apartments. This single apartment is responsible for holding multiple threads rather than just a single thread. There is no requirement of a message queue because all of the threads are a part of the same apartment and are allowed to share data without any proxy.
The developer must ensure that thread synchronization as part of the coding to make sure that the threads will not simultaneously access the same resources.
Posted Date:- 2021-09-21 05:06:51
A DataSet is used for representing the complete relational database in the memory, in the form of tables, relations, and views.A DataSet is specifically designed to ensure that the work is performed without any continued connection to the original data source.The Data in a DataSet can be loaded in bulk, rather than being loaded on demand.A dataset does not include the concept of cursor types.
The DataSets do not maintain any current record pointer You can use For Each loops in order to move along with the data.You are allowed to store many edits in a DataSet, and also write them to the original data source in a single operation.
By using the Data set, you are allowed to retrieve data from databases like SQL Server , and Oracle and also help them in managing one dataset, with a recordset this doesn't seem to be not possible.
The dataset is represented using XML while the recordset will make use of COM.
Recordset will not be allowed to be transmitted on HTTP while Dataset is allowed.
Posted Date:- 2021-09-21 05:06:00
Metadata: In simple terms, Metadata is considered as the data about the content of the data. The metadata is usually found in the catalog of libraries. In generic terms, metadata is used for analyzing data of databases and can also be used for other purposes as well.
JIT: JIT stands for Just in Time compiler. The JIT compiler can be used as a part of the runtime execution environment. There are three different types of JIT available and they are:
1.Pre-JIT: In the Pre-JIT, the compilation takes place at the time of deployment of an application.
2.Econo-JIT: The compilation takes place when methods are called during the runtime
3.Normal JIT: The normal JIT is responsible for performing the compilation of the called methods at runtime and they will get compiled when called for the first time.
Posted Date:- 2021-09-21 05:05:29
There are 6 different types of dialog boxes used in Windows forms such as;
1. Color Dialog
2. Font dialog
3. Open File dialog
4. Print Dialog
5. Print preview dialog
6. Save File dialog
Posted Date:- 2021-09-21 05:04:54
The functions in Vb.Net can help the function to send information back to where it has been called from. This Function return method can be used to perform a comparison in C++ or Java. The only difference with Sub Routines is that it cannot return values.
Posted Date:- 2021-09-21 05:04:13
The object-oriented program offers a way to modularizing by creating a partitioned functional memory area. And also can be used as a data template for creating copies of such functional memory area. Object-oriented programming allows the decomposition of the problems into numerous data entities they called Objects. Then they built numerous data and functions around the objects.
Posted Date:- 2021-09-21 05:03:28
Shared in Vb.Net declared as Shared variables, which are not associated with any specific instances of a structure or class, rather these variables are available to all the instances of the class or structure.
Posted Date:- 2021-09-21 05:02:54
A delegate in vb.net is very similar to a function pointer in C or C++ language. It allows the programmer to encapsulate a reference to a method inside a delegate object. Additionally, it can be used to create a custom event within a class.
Posted Date:- 2021-09-21 05:02:28
This is another frequently asked question at vb.net interviews. You need to explain that garbage collection is a low-priority process in vb.net that serves as an automatic memory manager. The main purpose of this is to manage the allocation and release of memory for the applications
Posted Date:- 2021-09-21 05:02:04
Managed Code is used to run inside the CLR environment and it is called as .NET run time. All Intermediate Language (IL) are set to be Managed code.
Posted Date:- 2021-09-21 05:01:32
There are three types of Authentication and they are –
1. Windows Authentication
2. Forms Authentication
3. Passport Authentication
Posted Date:- 2021-09-21 05:01:13
Authentication is the process of obtaining credentials from the users and verifying the user’s identity. Authorization is the process of giving access to the authenticated resources. Authentication leads to Authorization.
Posted Date:- 2021-09-21 05:00:44
TRACE allows the user to view how the code has been executed in detail. This tells how the code is working.
Posted Date:- 2021-09-21 05:00:29
System.string class is non-updatable and it will create new string object instead of updating the same. But updation in the same string object is possible for String. Stringbuilder class. So, the operation on string builder is faster and efficient than the string class.
Posted Date:- 2021-09-21 05:00:05
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.]
Posted Date:- 2021-09-21 04:59:49
Variable must be compulsorily declared when the Option Explicit is termed as ON. If it is OFF, variables can be used without declaration.
Posted Date:- 2021-09-21 04:59:02