Select Category 
dot net question answers, questins , answers
Explain the importance and use of each, Version, Culture and PublicKeyToken for an assembly.
dot net question answers, questins , answers
  This three alongwith name of the assembly provide a strong name or fully qualified name to the assembly. When a assebly is referenced with all three.

PublicKeyToken: Each assembly can have a public key embedded in its manifest that identifies the developer. This ensures that once the assembly ships, no one can modify the code or other resources contained in the assembly.

Culture: Specifies which culture the assembly supports
 
Version: The version number of the assembly.It is of the following form major.minor.build.revision.

Explain the differences between public, protected, private and internal.
These all are access modifier and they governs the access level. They can be applied to class, methods, fields.

Public: Allows class, methods, fields to be accessible from anywhere i.e. within and outside an assembly.

Private: When applied to field and method allows to be accessible within a class.

Protected: Similar to private but can be accessed by members of derived class also.

Internal: They are public within the assembly i.e. they can be accessed by anyone within an assembly but outside assembly they are not visible.

dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot n
dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questins , answers dot net question answers, questin
 

DotNet Interview Questions Answers

DotNet Interview Question - 136 : -

Explain the importance and use of each, Version, Culture and PublicKeyToken for an assembly.

DotNet Interview Answer - 136 : -

  This three alongwith name of the assembly provide a strong name or fully qualified name to the assembly. When a assebly is referenced with all three.

PublicKeyToken: Each assembly can have a public key embedded in its manifest that identifies the developer. This ensures that once the assembly ships, no one can modify the code or other resources contained in the assembly.

Culture: Specifies which culture the assembly supports
 
Version: The version number of the assembly.It is of the following form major.minor.build.revision.

Explain the differences between public, protected, private and internal.
These all are access modifier and they governs the access level. They can be applied to class, methods, fields.

Public: Allows class, methods, fields to be accessible from anywhere i.e. within and outside an assembly.

Private: When applied to field and method allows to be accessible within a class.

Protected: Similar to private but can be accessed by members of derived class also.

Internal: They are public within the assembly i.e. they can be accessed by anyone within an assembly but outside assembly they are not visible.

 

DotNet Interview Question - 137 : -

  When was the first version of .NET released?

DotNet Interview Answer - 137 : -

The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.
 

DotNet Interview Question - 138 : -

Describe the advantages of writing a managed code application instead of unmanaged one. What's involved in certain piece of code being managed?

DotNet Interview Answer - 138 : -

  "Advantage includes automatic garbage collection,memory management,security,type checking,versioning

Managed code is compiled for the .NET run-time environment. It runs in the Common Language Runtime (CLR), which is the heart of the .NET Framework. The CLR provides services such as security,
memory management
, and cross-language integration. Managed applications written to take advantage of the features of the CLR perform more efficiently and safely, and take better advantage of developers existing expertise in languages that support the .NET

 

DotNet Interview Question - 139 : -

What are possible implementations of distributed applications in .NET?

DotNet Interview Answer - 139 : -

.NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.
 

DotNet Interview Question - 140 : -

Is it possible to use multipe inheritance in .net?

DotNet Interview Answer - 140 : -

  Multiple Inheritance is an ability to inherit from more than one base class i.e.  ability of a class to have more than one superclass, by inheriting from different sources and thus combine separately-defined behaviors in a single class. There are two types of multiple inheritance: multiple type/interface inheritance and multiple implementation inheritance. C# & VB.NET supports only multiple type/interface inheritance, i.e. you can derive an class/interface from multiple interfaces. There is no support for multiple implementation inheritance in .NET. That means a class can only derived from one class.
 

DotNet Interview Question - 141 : -

  Difference between int and int32 ?

DotNet Interview Answer - 141 : -

  Both are same. System.Int32 is a .NET class. Int is an alias name for System.Int32.
 

DotNet Interview Question - 142 : -

How Boxing and unboxing occures in memory?

DotNet Interview Answer - 142 : -

  Boxing converts value type to reference type , thus allocating memory on Heap . Unboxing converts already boxed reference types to value types through explicit casting , thus  allocating memory on stack .
 

DotNet Interview Question - 143 : -

How do you define the lease of the object?

DotNet Interview Answer - 143 : -

By implementing ILease interface when writing the class code.
 

DotNet Interview Question - 144 : -

What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?

DotNet Interview Answer - 144 : -

Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process. Web Services provide an open-protocol-based exchange of information. Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.
 

DotNet Interview Question - 145 : -

What does this useful command line do? tasklist /m "mscor*"

DotNet Interview Answer - 145 : -

  Lists all the applications and associated tasks/process currently  running on the system with a module whose name begins "mscor" loaded into them; which in nearly all cases means "all the .NET processes".
 

DotNet Interview Question - 146 : -

How can you assign an RGB color to a System.Drawing.Color object?

DotNet Interview Answer - 146 : -

Call the static method FromArgb of this class and pass it the RGB values.
 

DotNet Interview Question - 147 : -

  How is a strongly-named assembly different from one that isn’t strongly-named?

DotNet Interview Answer - 147 : -

  Strong names are used to enable the stricter naming requirements associated with shared assemblies. These strong names are created by a .NET utility – sn.exe

Strong names have three goals:
· Name uniqueness. Shared assemblies must have names that are globally unique.
· Prevent name spoofing. Developers don't want someone else releasing a subsequent version of one of your assemblies and falsely claim it came from you
, either by accident or intentionally.
· Provide identity on reference. When resolving a reference to an assembly
, strong names are used to guarantee the assembly that is loaded came from the expected publisher.

Strong names are implemented using standard public key cryptography. In general, the process works as follows: The author of an assembly generates a key pair (or uses an existing one), signs the file containing the manifest with the private key, and makes the public key available to callers. When references are made to the assembly,What is Reflection?

DotNet Interview Answer - 148 : -

It extends the benefits of metadata by allowing developers to inspect and use it at runtime. For example, dynamically determine all the classes contained in a given assembly and invoke their methods. Reflection provides objects that encapsulate assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object. You can then invoke the type's methods or access its fields and properties. Namespace: System.Reflection
 

DotNet Interview Question - 149 : -

What is "Common Language Specification" (CLS)?

DotNet Interview Answer - 149 : -

CLS is the collection of the rules and constraints that every language (that seeks to achieve .NET compatibility) must follow. It is a subsection of CTS and it specifies how it shares and extends one another libraries.
 

DotNet Interview Question - 150 : -

What is the difference between Finalize() and Dispose()?

DotNet Interview Answer - 150 : -

  Dispose() is called by the user of an object to indicate that he is finished with it, enabling that object to release any unmanaged resources it holds. Finalize() is called by the run-time to allow an object which has not had Dispose() called on it to do the same. However, Dispose() operates determinalistically, whereas there is no guarantee that Finalize() will be called immediately when an object goes out of scope - or indeed at all, if the program ends before that object is GCed - and as such Dispose() is generally preferred.