CLR is .NET equivalent of Java Virtual Machine (JVM).

It is the runtime that converts a MSIL code into the host machine language code, which is then executed appropriately. The CLR is the execution engine for .NET Framework applications. It provides a number of services, including: ? Code management (loading and execution) ? Application memory isolation ? Verification of type safety ? Conversion of IL to native code. ? Access to metadata (enhanced type information) ? Managing memory for managed objects. ? Enforcement of code access security ? Exception handling, including cross-language exceptions ? Interoperation between managed code, COM objects, and pre-existing DLL's (unmanaged code and data) ? Automation of object layout ? Support for developer services (profiling, debugging, and so on).


CTS provides a type system that is common across all languages.CTS defines how data types are declared,used,&managed in the code during runtime.It also defines rules that ensures that the data types of object written in various languages are able to interact with each other.

3)ADO and

In ado we don't have providers to get connection with database and also we don't have classes like DataSet and dataadapter. whereas in we have providers like MSDAORA.1 for oracle server and DAMYSQL for MYSQL server to get connection with oracle and mysql server. is it wise to say ADO.NET is a disconnected model? since we have datareader which is a connected data model

4)strong name Strong Name is required to register the assembly into GAC. Conatins the assembly name, versoin etc. info.

An example is trying to access a file that doesn't exist. These are easy to track down in VB. you'll get a dialogue box popping up telling you that there were Build errors. we'll take a look at ways you can track down errors using VB. . and just keeps going round and round. Runtime errors are a lot harder to track down. After all. then the loop has no way to exit. They happen when your code doesn't quite behave the way you thought it would. A classic example is creating an infinite loop of the type "Do While x is greater than 10". and you should write code to trap runtime errors. If you're trying to open a database in a specific location. you're the programmer. As their name suggests.NET. In this section. a Runtime error will occur. Logic errors also occur when the programme is running. you get the blame. Unless you write perfect code every time. there's no getting away from it. But they will ensure that it doesn't work properly. and Logic errors. these errors occur when the programme is running. Both has the reusable pieces of code in the form of classes/ functions. Two types of assemblys: Shared assembly and private assembly. Dll needs to be registered but assemblies have its own metadata. because you get a blue wiggly line pointing them out. Types of Error Programming errors are generally broken down into three types: Design-time. and the database has been moved. They happen when your programme tries to do something it shouldn't be doing. If you try to run the programme. These occur when the environment you're programming in doesn't understand your code. If and when that happens. Runtime. Stay at Home and Learn y Debugging your code is something you will need to do.5)Assemblies are similar to dll files. It's your job to predict a thing like this. If x is always going to be greater than 10. A Design-time error is also known as a syntax error. Logic errors tend not to crash your programme.NET. and code accordingly. Runtime errors usually cause your programme to crash.

txt" We're saying that there is a text file called test which is at the location (path) "C:\".IO. just like a String or Integer variable. Then. You set up the StreamReader to be a variable. you are assigning a StreamReader to a variable.IO.txt" Dim objReader As New System. after the "As" word comes "New". You create a StreamReader like this: Dim FILE_NAME As String = "C:\test.StreamReader(FILE_NAME) VB will then assign all of this to the variable called objReader. So instead of assigning say 10 to an Integer variable. This.IO. IO is an object within System. reads streams of text. And StreamReader is an object within IO. This means "Create a New Object".StreamReader(FILE_NAME) The first line just sets up a string variable called FILE_NAME. But we're setting up this variable differently: Dim objReader As New System.IO. We've just told VB where the text file is and what object to open it with.get the eBook here! Read To End But this won't do you any good. you need to create something called a "StreamReader". StreamReader needs the name of a file to Read. You do the opening like this: .To open up a text file. as its name suggests. No more reading these lessons online .StreamReader Sysytem is the main object. We haven't actually opened the text file yet.StreamReader(FILE_NAME) We've called the variable objReader. The StreamReader is an object available to System. We store the path and name of our text file inside of the string variable: = "C:\test.IO. The type of object we want to create is a StreamReader object: System. This goes between a pair of round brackets: System.

IO. and just leave it on the default Name of Textbox1 Set its MultiLine property to True Add a Button to your form Double click the button and add the following code for it: Dim FILE_NAME As String = "C:\test. . right to the end. otherwise you¶ll get errors messages. Let's test all this theory out. Do the following: y y y y y Start a new project Add a textbox to your new form. One of the Methods available to our new StreamReader variable is the ReadToEnd method. You have to close your stream objects after you¶ve used them.Text = objReader. We're then popping this in a textbox. This will read the whole of your text.txt" Dim objReader As New System.Text = objReader.ReadToEnd objReader.ReadToEnd Now that objReader is an object variable.StreamReader(FILE_NAME) TextBox1.Close() The last line closes the StreamReader we set up.TextBox1. it has its own properties and methods available for use (in the same way that the textbox has a Text property).

Sign up to vote on this title
UsefulNot useful