ANSWER
The .NET Framework is a new platform designed for easy application development. The .NET framework has two main components, the Common Language Runtime and the .NET class library. The Common Language Runtime manages the application code by supporting services, such as memory management and thread management. The .NET class library is a collection of reusable classes that can be used for developing applications.
ANSWER
No. ASP.NET uses parsers to strip the code from ASPX files and copy it to temporary files containing derived Page classes, and a given parser understands only one language.
ANSWER
Any language can target the .NET Framework. Currently, you can build .NET programs in a number of languages, such as C++, Visual Basic .NET, JScript, and C#. Some third-party languages will also be available in the future for developing .NET Framework applications. These languages include COBOL, Eiffel, Perl, Python, and Smalltalk.
ANSWER
Visual Basic .NET is the latest version of Visual Basic that allows easy creation of Web and n tier applications. It supports features, such as Windows and Web Forms, ADO.NET for database connectivity, improved type safety, object-oriented features, and visual inheritance, that can help you create and deploy scalable Web sites.
ANSWER
Operating systems and run-time environments provide application isolation to ensure that the code in one application does not adversely affect another application. Isolating applications helps ensure that an application does not access the address space of another application. In the .NET Framework, the CLR uses application domains to isolate applications. Thus, an application domain is a secure unit of processing in the .NET Framework. Microsoft .NET Remoting provides a framework to allow objects to interact with other objects residing in different application domains, different processes, and on different computers. .NET remoting provides services, such as channels, formatters, object activation and life cycle, and object registration to achieve interaction between remote objects. Channels are used as transport mediums when a client invokes a method of a remote object. A remote object may provide more than one channel. The client can select the channel that best suits its requirement. Formatters are used to encode and decode messages before the channel transports the messages.
ANSWER
The Common Language Runtime is the execution engine for .NET Framework applications. It performs a number of functions, such as loading and executing an application, performing automatic memory management, ensuring type safety, and handling exceptions. It is one of the most important components of the .NET Framework.
ANSWER
The Common Type System is a type system built into the CLR. The CTS supports the data types found in most programming languages.
ANSWER
The Common Language Specification is a subset of the CTS. It provides guidelines for library developers and compiler writers. It allows developers to create libraries that can be used in any language that supports the CLS.
ANSWER
Microsoft Intermediate Language is a CPU-independent instruction set. When you compile a .NET Framework application, it is converted into MSIL. When you execute the .NET Framework application on a computer, the instructions specified in MSIL are translated into the native code. MSIL ensure cross-language integration. Note that MSIL is not interpreted.
ANSWER
Garbage collection is a process that detects objects that are no longer used by an application. It automatically releases the memory associated with the object.
ANSWER
Managed code is the code that is managed by the CLR. In other words, managed code is written to target the CLR. All code written in Visual Basic and C# is managed by default. Unmanaged code, on the other hand, does not benefit from the features provided by the CLR, such as garbage collection and type safety.
ANSWER
Yes. You can use Perfmon.exe in Windows 2000 to monitor the activities and performance of the CLR. Expand the Performance Logs and Alerts node. Double-click System Overview. In the System Overview Properties dialog box, click the Add button. In the Select Counters dialog box, select the Performance object drop-down list. This list displays various objects, such as .NET CLR Interop and .NET CLR Memory. You can add these objects and monitor the activities and performance of the CLR.
ANSWER
A reference is the name and address of the .NET assembly or a COM component used inside some source files of the project. The Visual Studio.NET uses these added references when compiling your project assembly. A reference enables the language compiler to locate the referenced assemblies and COM component.
ANSWER
Right click the project and select properties. It will show the property pages for the project. You can change the resulting assembly name from Common Properties> General > Assembly Name.
ANSWER
The debug build is created with some embedded information which allows the debugger to debug the application and exposes the runtime behavior of the application. On the down side, the debug build is a bit slower and inefficient in execution and larger in size. You may specify the build type of an assembly (project) by right clicking its project and selecting properties from the pop up menu. It will show the property pages for the project. You can select the build type by selecting Configuration Properties and then selecting the build type from the combo box at top labeled Configuration
ANSWER
To exit the win form application programmatically, call the Application.Exit() method.
ANSWER
GAC (Global Assembly Cache) is used where shared .NET assembly reside. GAC is used in the following situations :- • If the application has to be shared among several application. • If the assembly has some special security requirements like only administrators can remove the assembly. • If the assembly is private then a simple delete of assembly the assembly file will remove the assembly.
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 {}.
ANSWER
No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.
ANSWER
Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.
ANSWER
When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.
ANSWER
CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.
ANSWER
The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.
ANSWER
StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.
ANSWER
Value, and it’s datatype depends on whatever variable we’re changing.
ANSWER
It’s available to derived classes and classes within the same Assembly (and naturally from the base class it’s declared in).
ANSWER
Two. Once you write at least one constructor, C# cancels the freebie constructor, and now you have to write one yourself, even if there’s no implementation in it.
ANSWER
The method can be over-ridden.
ANSWER
No, you can’t, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override.
ANSWER
No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
ANSWER
Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.
ANSWER
They all must be public. Therefore, to prevent you from getting the false impression that you have any freedom of choice, you are not allowed to specify any accessibility, it’s public by default.
ANSWER
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
ANSWER
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.
ANSWER
Place a colon and then the name of the base class. Example: class MyNewClass : MyBaseClass
ANSWER
1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden. 2. When at least one of the methods in the class is abstract.
ANSWER
It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.
ANSWER
Structs are value-type variables and are thus saved on the stack, additional overhead but faster retrieval. Another difference is that structs cannot inherit.
ANSWER
Value. The data type of the value parameter is defined by whatever data type the property is declared .
ANSWER
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
ANSWER
Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.
ANSWER
Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating
ANSWER
No there is not possible to inline assembly or IL in C# code.
ANSWER
Deletes it from the memory.Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
ANSWER
MemoryStream It is a nonbuffered stream whose encapsulated data is directly accessible in memory(RAM not files on disk).
ANSWER
we can make a class Instantiable by declaring it as a abstract class
ANSWER
It is the diamond of death problem. Multiple Inheritance means the ability to inherit from more than a single direct base class. For example: class Derived : public Base1, private Base2 { //... }; Allowing MI introduces the possibility that a class may have the same (direct or indirect) base class appear more than once as an ancestor. A simple example of this is the "Diamond of Death" shape: B / C1 C2 / D Here B is an indirect base class of D twice, once via C1 and once via C2. This situation introduces the need to an extra feature in C++: virtual inheritance. Does the programmer want D to have one B subobject, or two? If one, B should be a virtual base class; if two, B should be a normal (nonvirtual) base class.
ANSWER
value types are those data type which size are fix.such as integer,float... it is stored in stack.value type variables value can access directly from the stack. some user defined Data type such as structure, enum are also value type. Reference types are those data type which size are not fix.such as string,object...it use heap to store the address first variable value.
ANSWER
A) Use of attributes B) Strong data typing C) Object orientation & use of interface D) MetadataToken
ANSWER
DirectCast requires the run-time type of an object variable to bethe same as the specified type.The run-time performance ofDirectCast is better than that of CType, if the specified type and the run-time typeof the expression are the same. Ctype works fine if there is a valid conversion defined between the expression and the type.
ANSWER
In Call stack window in MS Visual Studio IDE.
ANSWER
jjh
ANSWER
ANSWER