CLS: CLS stands for Common Language Specification. CLS is referred to as a subset of CTS and it is used for uniting all languages under one single umbrella. CLs also extends to provide its extensible support to all the .NET language into a single unit.
CTS: CTS stands for Common Type System. CTS is used for communicating between the languages. For example, if VB has an Integer data type and C++ has a long data type and these data types will not be compatible with each other.
Posted Date:- 2021-09-21 04:57:20
While the ‘system.string’ class creates a new string object, updating in the same string object is possible for string builder class instead. Also, the operation of a string builder is much faster and efficient as compared to the string class.
Posted Date:- 2021-09-21 04:55:48
As an experienced VB.net professional, you’re expected to be familiar with various terminologies used in the language such as GAC, CTS, serialization, CLS, etc. You need to explain that GAC or Global assembly cache is used where shared .NET assembly resides. Below are the criteria for using GAC:
1. f.net application has to be shared with other applications.
2. If.net assembly has any special security requirements.
Posted Date:- 2021-09-21 04:54:56
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.*,.......]
Posted Date:- 2021-09-21 04:54:01
Irrespective of your experience in vb.net language, this is a frequently asked question at interviews. You need to explain that the .net framework is a collection of different classes and services and exists as a layer between .net applications and the underlying operating system. Also, talk about how.net framework consists of different web forms, window forms, and console applications.
Posted Date:- 2021-09-21 04:52:28
A Destructor is used to release or delete the objects that have been created by Constructor. In VB.NET, the Garbage Collector automatically manages the allocation , assignment and release of memory for the managed objects in your application. However, you may require Destructors to delete unmanaged resources that your application creates. There can be only one destructor for a class.
Posted Date:- 2021-09-21 04:51:44
The tools for VB.NET development are as follows:
1. Mono Development Platform (Linux)
2. Microsoft Visual Studio
Posted Date:- 2021-09-21 04:50:59
The Friend keyword in the declaration statement specifies that the elements can be manipulated from within the same assemby but not from outside the assembly.
Posted Date:- 2021-09-21 04:50:14
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
Posted Date:- 2021-09-21 04:49:39
1. VB.NET is an Interpreted Language whereas VB.NET is a Compiled one.
2. Visual Basic is a Backword compatible whereas VB.NET is not backward compatible.
3. VB cannot be used to develop Multi-Threaded applications whereas VB.NET helps to develop Multi-Threaded applications.
Posted Date:- 2021-09-21 04:48:23
System.string class is non-updatable and it will create a new string object instead of updating the same.
But updating in the same string object is possible for the StringBuilder class. So, the operation of a string builder is faster and efficient than the string class.
Posted Date:- 2021-09-21 04:47:39
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:46:27
There are three types of generations in garbage collector.
Generation 0 – This identifies a newly created object that has been never marked for collection.
Generation 1 – This identifies an object which has been marked as collection but not removed.
Generation 2 – This identifies an object that has survived more than one sweep of the Garbage collector.
Posted Date:- 2021-09-21 04:45:53
Finalize method is called by Garbage collector which helps us to make free of unmanaged resources. There are some other resources like window handles, database connections are handled by iDisposable interface.
Dispose method is handled by IDisposable interface to explicitly release unused resources. Dsipose can be called even if other references to the object are alive.
Posted Date:- 2021-09-21 04:44:47
Redim keyword is exclusively used for arrays and it is used to change the size of one or more dimensions of an array that has been already declared. Redim can free up or add elements to an array whenever required.
1. Dim intArray(7, 7) As IntegerReDim Preserve intArray(7, 8)ReDim intArray(7, 7)
Posted Date:- 2021-09-21 04:44:04
Are all of these equal? Under what circumstances should I choose each over the others?
1.ToString()
2.CStr(var)
3.CType(var, String)
4.DirectCast(var, String)
EDIT: Suggestion from NOTMYSELF…
5.TryCast(var, String)
Those are all slightly different and generally have acceptable usage.
TOSTRING()is going to give you the string representation of an object, regardless of what type it is. Use this if var is not a string already.
CSTR(var)is the VB string, cast operator. I’m not a VB guy, so I would suggest avoiding it, but it’s not really going to hurt anything. I think it is basically the same as CType.
CTYPE(var, String)will convert the given type into a string, using any provided conversion operators.
DIRECTCAST(var, String)is used to up-cast an object into a string. If you know that an object variable is, in fact, a string, use this. This is the same as (string)var in C#.
TRYCAST(as mentioned by @NotMyself) is like DirectCast, but it will return Nothing if the variable can’t be converted into a string, rather than throwing an exception. This is the same as var as a string in C#. The TryCast page on MSDN has a good comparison, too.
Posted Date:- 2021-09-21 04:42:39
I have an object parameter and I need to check if the object implements a specified interface in vb.net. How to test this?
Thanks.
Use TYPEOF…IS:
If TypeOf object parameter Is ISpecifiedInterface Then
‘do stuff
End If
Posted Date:- 2021-09-21 04:41:32
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.
Posted Date:- 2021-09-21 04:40:58
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.
Posted Date:- 2021-09-21 04:38:29
Finalize method is called by Garbage collector which helps us to make free of unmanaged resources. There are some other resources like window handles, database connections are handled by iDisposable interface.
Dispose method is handled by IDisposable interface to explicitly release unused resources. Dsipose can be called even if other references to the object are alive.
Posted Date:- 2021-09-21 04:37:52
A Manifest is a text file that is used to store metadata information of .NET assemblies. File type of Manifest can be saved as a type PE. Assembly Name, Version, Culture and key token can be saved as a Manifest.
Posted Date:- 2021-09-21 04:37:25
Jagged array is nothing but an array of arrays. Each entry in the array is another array that can hold any number of items.
Posted Date:- 2021-09-21 04:36:54
Hashtable is set to be items with key and value pairs. Keys are referred to as indexes and a quick search can be performed for values by searching through the keys.
Posted Date:- 2021-09-21 04:36:22
New keyword is used with the constructor in which it can be used as a modifier or an operator. When it is used as a modifier, it hides inherited member from the base class member. When it is used as an operator, it creates an object to invoke constructors.
1. Dim frm As New Form1 frm.show()
Posted Date:- 2021-09-21 04:35:23
Hashtable is set to be items with key and value pairs. Keys are referred to as indexes and a quick search can be performed for values by searching through the keys.
Posted Date:- 2021-09-21 04:34:41
Int32 represents 32-bit signed integer whereas it is not a keyword used in VB.Net.
Posted Date:- 2021-09-21 04:34:15
System.string class is non-updatable and it will create a new string object instead of updating the same.
But updating in the same string object is possible for the StringBuilder class. So, the operation of a string builder is faster and efficient than the string class.
Posted Date:- 2021-09-21 04:33:43
Garbage collection is also known as automatic memory management, which is used for automatic recycling of dynamically allocated memory. Garbage collection is performed by a Garbage collector which will recycle memory if it is sure that memory will be unused.
Posted Date:- 2021-09-21 04:33:02
The jagged array is an array of arrays. Each entry in the array is another array that can hold any number of items.
Posted Date:- 2021-09-21 04:31:41
Net generally allows implicit conversion of any data types. In order to avoid data loss during data type conversion, Option Strict keyword is used and it ensures compile time notification of these types of conversions.
Option Explicit is the keyword used in a file to explicitly declare all variables using declare keywords like Dim, Private, Public or Protected. If undeclared variable name persists, an error occurs at compile time.
Posted Date:- 2021-09-21 04:31:09
.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.]
Posted Date:- 2021-09-21 04:20:39
Based on Framework understanding and OOPS Concepts,Use of Different Component Library.
Posted Date:- 2021-09-21 04:20:13
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.
Posted Date:- 2021-09-21 04:19:51
<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>
Posted Date:- 2021-09-21 04:19:31
Lisbox1.Items.Add "Prashant"
Lisbox1.Items.Add "Chinchu"
Lisbox1.Items.Add "Pallavi"
Lisbox1.Items.Add "Suresh"
Lisbox1.Items.Add "Polika"
Posted Date:- 2021-09-21 04:19:10
.Net generally allows implicit conversion of any data types. In order to avoid data loss during data type conversion,
option strict keyword is used and it ensures compile-time notification of these types of conversions.
Option Explicit is the keyword used in a file to explicitly declare all variables using declare keywords like Public, Dim, Private, or Protected.
If an undeclared variable name persists, an error occurs at compile time.
Posted Date:- 2021-09-21 04:18:48
INTERNAL keyword is one of the access specifier which will be visible in a given assembly i.e. in a DLL file. This forms a single binary component and it is visible throughout the assembly.
Posted Date:- 2021-09-21 04:18:21
Metadata is termed as “Data about the content of the data†and it is found in the catalog of libraries. Practically, it is used to analyzed data of database can be used for some other purpose also.
A namespace is an organized way of representing Class, Structures, and interfaces present in the .NET language. Namespaces are a hierarchically structured index of a class library, available to all .NET Languages.
It stands for Just in Time compiler which is used as a part of the runtime execution environment. There are three types of JIT and they are:
>> Normal JIT – Compiles called methods at runtime and they get compiled the first time when called.
>> Pre-JIT – Compiles at the time of deployment of an application.
>> Econo-JIT – Compiles called methods at runtime.
Posted Date:- 2021-09-21 04:18:01
There are two types of assembly –
>> Private – A private assembly is normally used by a single application and it is stored in application’s directory.
>> Public – A public assembly or shared assembly is stored in Global Assembly Cache(GAC) which can be shared by many applications
Posted Date:- 2021-09-21 04:16:52
if temp is dbnull.value or temp = 0
produces the error *Operator ‘=’ is not defined for type ‘DBNull’ and type ‘Integer’.**
while this one works like a charm!
if the temp is dbnull.value OrElse temp = 0
OrElse is a short-circuiting operator Or is not.
By the definition of the boolean ‘or’ operator, if the first term is True then the whole is definitely true – so we don’t need to evaluate the second term.
OrElse knows this, so don’t try and evaluate temp = 0 once it’s established that temp Is DBNull.Value
Or doesn’t know this, and will always attempt to evaluate both terms. When temp Is DBNull.Value, it can’t be compared to zero, so it falls over.
You should use… well, whichever one makes sense.
Posted Date:- 2021-09-21 04:15:21
Strong Name is an important feature of .Net and it is used to identify shared assembly uniquely. Strong name has solved the problem of creating different object with same name and it can be assigned with the help of Sn.exe.
Posted Date:- 2021-09-21 04:14:19
An assembly is one of the elements of a .NET application and it termed as a primary unit of all .NET applications. This assembly can be either DLL or executable file.
Posted Date:- 2021-09-21 04:14:01
JIT is termed as Just in Time compiler which is used as a part of runtime execution environment. There are three types of JIT and they are:
>> Pre-JIT – Compiles at the time of deployment of an application
>> Econo-JIT – Compiles called methods at runtime
>> Normal JIT – Compiles called methods at runtime and they get compiled first time when called
Posted Date:- 2021-09-21 04:13:42
System.Data namespace is used for accessing and managing data from the required data source. This namespace deals only with the data from the specified database.
Posted Date:- 2021-09-21 04:13:10
A namespace is referred to as an organized way of representing Classes, interfaces, Structures that are present in .NET language. Namespaces are hierarchically structured indexes of a class library,which are available to all .NET Languages. In simple terms, the namespace is used for grouping the classes logically. The System.Data namespace is the namespace that is used for the accessing and management of the data from the required data sources. This namespace deals only with the data from the database that is specified.
Posted Date:- 2021-09-21 04:12:44
CTS in the Vb.net framework represents the common type of system. This is also considered as a subset of the common language specification. CTS also helps the user to keep consistency while developing codes. Microsoft later added that the Common type system is designed to keep equality and relatively within the multiple languages within the same .net Programming frameworks.
Posted Date:- 2021-09-21 04:12:07
Sub Main command indicates the entry point in the Vb.Net program.
Posted Date:- 2021-09-21 04:11:47
The Vb.Net framework is a platform-independent and language-independent tool developed by the leading software company Microsoft. This tool supports multiple programming languages such as C#, Visual Basic script, J Script, C++ codes, and many more. Vb.net also allows user to run their codes on multiple platforms such as Linux, Mac OS, Windows XP, and UNIX. This programming tool also contains various libraries that help in faster application development, cheaper, and easy to use.
Posted Date:- 2021-09-21 04:11:28
Metadata is termed as “Data about content of the data†and it is found in the catalog of libraries. Practically, it is used at back side of book to see the necessary topic.
Posted Date:- 2021-09-21 04:11:03
Vb.net is referred to as one of the programming languages which is available in Visual Studio. Net. VB.Net also contains different features of visual basic, also called as an event-based programming language. VB.Net also includes the different object-oriented concepts. In simple terms, VB.Net is a programming language that is an extension of Visual Basic in order to make it compliant with the .Net Framework. Also, VB.Net is called a fully Object Oriented programming language which is different from Visual Basic and everything in VB.Net consists of only an object.
As it is compliant with the .Net Framework, VB.Net is flexible to make use of the different Framework Class Libraries that are provided by .Net Framework. VB.Net is used in order to create the software interface and codes by the programmers and is also referred to as the combination of the various components that are being used on the forms which also have some specific actions and attributes.
Posted Date:- 2021-09-21 04:10:41