netnotes
TRANSCRIPT
-
8/7/2019 .netnotes
1/4
JIT complier
In computing, just-in-time compilation(JIT), also known as dynamic translation, is a method to improve the
runtime performance ofcomputer programs. Traditionally, computer programs had two modes of runtime operation,
eitherinterpreted or static (ahead-of-time) compilation.[citation needed]
Interpreted code is translated from a high-level
language to a machine code continuously during every execution, whereas statically compiled code is translated into
machine code before execution, and only requires this translation once.
JIT compilers represent a hybrid approach, with translation occurring continuously, as with interpreters, but with
caching of translated code to minimize performance degradation. It also offers other advantages over statically
compiled code at development time, such as handling of late-bound data types and the ability to enforce security
guarantees
Common Language Runtime
The Common Language Runtime (CLR) is an Execution Environment . It works as a layerbetween Operating Systems and the applications written in .Net languages that conforms to
the Common Language Specification (CLS). The main function of Common Language Runtime(CLR) is to convert the Managed Code into native code and then execute the Program. The
Managed Code compiled only when it needed, that is it converts the appropriate instructionswhen each function is called . The Common Language Runtime (CLR) 's Just In Time (JIT)
compilation converts Intermediate Language (MSIL) to native code on demand at application runtime.
During the execution of the program ,the Common Language Runtime (CLR) manages
memory, Thread execution, Garbage Collection (GC) , Exception Handling, Common Type
System (CTS), code safety verifications, and other system services. The CLR ( CommonLanguage Runtime ) defines the Common Type System (CTS), which is a standard type systemused by all .Net languages . That means all .NET programming languages uses the same
representation for common Data Types , so Common Language Runtime (CLR) is a language-independent runtime environment . The Common Language Runtime (CLR) environment is also
referred to as a managed environment, because during the execution of a program it also controlsthe interaction with the Operating System. In the coming section you can see what are the main
functions of Common Language Runtime (CLR
SIDE by Side execution
Side by side execution means. two or more same dll with different versions reside in machinewhich is stored in the windows/assembly folder, the client application use this dll depending onthere requirement. old application use the old dll and new application build with new dll will use
the new both applications can run that is called side by side executtio
-
8/7/2019 .netnotes
2/4
DLL HELL
dll Hell refers to a set of problems caused when multipleapplications attempt to share a common component like adynamic link library (DLL). The reason for this issue was
that the version information about the differentcomponentsof an application was not recorded by the system.
.Net Framework provides operating systems with a GlobalAssembly Cache. This Cache is a repository for all the.Netcomponents that are shared globally on a particularmachine. When a .Net component is installed onto themachine, the Global Assembly Cache looks at its version,
its public key, and its language information and createsastrong name for the component. The component is thenregistered in the repository and indexed by its strongname, so there is no confusion between different versionsof the same component, or DLL.
DLL Hell Example :- This is a problem in loading aspecific dll
(class id, version number, path etc). For example, if Ibuild test.dll v1.0.0.0 and deploying it in c:\MyProg. Myapplication App1 and App2 are using the methods in thatdll. And there is a requirement to change something inApp1and I supposed to change test.dll also for the samerequirement. Once I finished with all my changes, I willbedeploying them in the appropriate locations. Now, theolder
dll will be overwritten. And my App2 will look fortest.dllof older version and since it is not there it will notwork. This is a scenario for dll hell issue..Net Framework provides operating systems with a GlobalAssembly Cache. This Cache is a repository for all the.Netcomponents that are shared globally on a particular
-
8/7/2019 .netnotes
3/4
machine. When a .Net component is installed onto themachine, the Global Assembly Cache looks at its version,its public key, and its language information and createsastrong name for the component. The component is then
registered in the repository and indexed by its strongname, so there is no confusion between different versionsof the same component, or DLL.
Array List :http://vb.net-informations.com/collections/vb.net_ArrayList.htm
Public Class Form1Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Dim i As IntegerDim ItemList As New ArrayList()ItemList.Add("Item4")ItemList.Add("Item5")ItemList.Add("Item2")ItemList.Add("Item1")ItemList.Add("Item3")MsgBox("Shows Added Items")For i = 0 To ItemList.Count - 1
MsgBox(ItemList.Item(i))Next'insert an itemItemList.Insert(3, "Item6")'sort itemms in an arraylist
ItemList.Sort()'remove an itemItemList.Remove("Item1")'remove item from a specified indexItemList.RemoveAt(3)MsgBox("Shows final Items the ArrayList")For i = 0 To ItemList.Count - 1
MsgBox(ItemList.Item(i))Next
End SubEnd Class
Ienumerator
http://www.vbforums.com/showthread.php?t=429002
http://visualbasic.about.com/od/usingvbnet/a/ienumble.htm
also see the code I downloaded in IDM
-
8/7/2019 .netnotes
4/4
Icompare Interface
http://support.microsoft.com/kb/321292
Private Class sortYearDescendingHelper : Implements IComparer
Function Compare(ByVal a As Object, ByVal b As Object) As Integer Implements
IComparer.CompareDim c1 As car = CType(a, car)
Dim c2 As car = CType(b, car)
If (c1.year < c2.year) ThenReturn 1
End If
If (c1.Year > c2.Year) Then
Return -1Else
Return 0End If
End FunctionEnd Class