Mar 8, 2009

.Net Interview Questions | Assembly - Part -1

1. What you mean by Assembly?
Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. All the .NET assemblies contain the definition of types, versioning information for the type, meta-data, and manifest.

2. What is menifest?

Detailed description of the assembly contents. A manifest contains metadata describing the name, resources, types, and version of the assembly as well as dependencies upon other assemblies. The manifest makes an assembly self-describing, easier to deploy, and not bound to a particular system because of storing data in the Windows registry.

3. How many type of assembly are there?
There are two types of Assembly in .NET
• Private Assembly
• Shared Assembly
Private Assembly: These are simple assemblies and being copied with each applications running folder.Dont nned to have strong name.
Shared Assembly: Also named as Strong Named Assemblies are copied to a single location (usually the Global assembly cache). For all calling assemblies within the same application, the same copy of the shared assembly is used from its original location. Hence, shared assemblies are not copied in the private folders of each calling assembly. Each shared assembly has a four part name including its face name, version, public key token and culture information. The public key token and version information makes it almost impossible for two different assemblies with the same name or for two similar assemblies with different version to mix with each other.
An assembly can be a single file or it may consist of the multiple files. In case of multi-file, there is one master module containing the manifest while other assemblies exist as non-manifest modules. A module in .NET is a sub part of a multi-file .NET assembly. Assembly is one of the most interesting and extremely useful areas of .NET architecture along with reflections and attributes.

4. What is GAC? WhereGAC located on machine?
GAC is known as Global Assembly Cache where the shared assembiles are being kept. GAC can be found on a system at \\Assembly ie. C:\Windows\Assembly

5. Can we have two DLL with same name into GAC?
GAC is a Folder that contains DLL that have strong name.We can say that GAC is a very special folder, and it is not possible to place two files with the same name into a Windows folder,But GAC differentiates DLL by strong names and since strong name can not be same hence wwe can put two DLL with same name into GAC. For example SameNameApp.dll and SameNameApp.dll to co-exist in GAC if the first one have version 1.0.0.0 and the second have 1.1.0.0.

.Net Interview Questions | [Assembly]

.Net Interview Questions | Assembly

In this section I included only questions related to Assembly.

1. What is assembly?
2. What is manifest?
3. How many type of assembly are there?
4. What is GAC? Where you found GAC on a machine?
5. Can we have two DLL with same name into GAC?
6. What is strong name?
7. How to Sign an Assembly with strong Name?
8. What is delay signing?
9. What is version number and Culture into Manifest?
10. What do you mean by satellite assemblies?
11. Do you know BCL?
12. In Assembly which work as GacBrowser ?

Answers [1-5] [6-10] [11-12]

Feb 28, 2009

Global Variable in C# | Application Cache Vs Static Variable

Some times we need to use some variable globaly so that it may be available to application wide. For having a global variable we can use static variables as well application cache.

Example :

Application["gVar1"]="Global variable One stored here";
and this can be get anywhere in application by using string var1 = (string)Application["Var1"];

The same thing can be by using static variable also.

public static string GVar1;

These variables need to be initialized first time into Global.asax.cs application_start() method and keep alive until a IIS reset or worker process recycle not occurs.

Application_Start()
{
Application["gVar1"]="Global variable One stored here";
Gvar2= "Global Variable Two is here";
}
For using the Gvar2 we need to simply write the className.Gvar2 // Here Global.Gvar2 will do the work for us.


So the question arise as both are doing the same work which we prefer to use.
I must say It depends!!

Why I said so? Because there are reasons behind this.
In the above scenario I must say I MUST use static variable. (Please make static property rather than directly using static variable)
So what factors you must count for choosing static -
1. Application holds variable as Object.
2. While getting the value we need to caste into the objects which it stores. Of course casting need some value.

So when we need to use some primitive variables and they are not going to changes very frequent (locking issue in case of frequent changes) we should use static variable.
Application need to be used when we need to Hold some objects application wide.
(Note Its my own experience please do not take it as hard and fast rule).

Thanks

Feb 22, 2009

UP CPMT2009

Uttar Pradesh Combined Pre Medical Test is an examination conducted by University of Lucknow on behalf of the Government of Uttar Pradesh. The examination is conducted for admission to various medical courses in Government and recognized, approved Medical, Dental, Homeopathic, Ayurvedic and Unani Colleges of Uttar Pradesh.

Important dates of UPCPMT

1. Feb to first week of March 2009 – availability of application forms.
2. 2nd week of March 2009 – deadline for submission of completed application forms.
3. Mid of May 2009 – date of examination.

Eligibility criteria for UPCPMT

  • The candidate must be a citizen of India and must have domicile of Uttar Pradesh.
  • The candidate must have cleared class 12th examination with PCB and English as one of the main subjects.

Courses offered for UPCPMT

1. MBBS
2. BDS
3. BHMS
4. BAMS
5. BUMS

Examination pattern and syllabus:

1. The examination will be conducted in two parts.
2. The first paper will contain questions from Zoology and Botany and the timings will be from 10:00 AM-12:00 Noon
3. The second paper will have questions from Chemistry and Physics and the timings will be from 2:0O PM-4:00 PM.


For more information keep watching this page....


Feb 8, 2009

AMU Admission Notice 2009 - 2010

Aligarh Muslim University (AMU) announces the admissions Notice for Academic session 2009-2010. First time AMU Entrance Test will be held on five centres across India (Only for BTech and MBBS/BDS), Rest of the Test courses will be held on Aligarh except Class XI/Diploma Engineering which will be held in Lucknow also along with Aligarh. For more information visit :http//amu.ac.in

Admissions related more information/Application Form can be downloaded at http://amucontrollerexams.com

Examination Notice:

Oct 28, 2008

Physics - Cyclotron



Purpose: Cyclotron is a device used to accelerate heavy charge particles e.g.protons,deuerons etc.

Principle: It is based on the p
rinciple that a changed particle can be accelerated to very hagh energies by making it pass through a moderate electric field a number of times and applying a strong magnetic field at same time.

Construction: -


1-Strong electromagnet(N&S).

2-Two dees D1&D2 (D shaped hollow semi circular copper chambers called dees).

3-Source of high voltage coupled with adjustable high frequency oscillator.

4-Source of charged ions at the centre of the dees.g. deuterium for protons,helium for a-particles,bombarded with high energy electrons.
The hole assembly is housed in a vaccum chamber which is evacuated to a pressure of about 10-6 mm Hg,to avoid collision of charged particlels with medium gas particles which would result in loss of energy.

Oct 26, 2008

Physics-Moving coil galvanometer



It is an instrument to detect and measure the strength of small electric current.

Principle:--When a current carrying coil is placed in magnetic field,it is experience a torque.

Construction:-It is consists of a coil bound on a non-magnetic field.The coil is suspended between two poles of a permanent magnet which are concave in shape.the coil is suspended by a phosphur bronze strip and this strip is connected to the terminal T1 of the galvanometer and other end of the coil is connected to hair spring which is connected to terminal T2 .A peace of the soft iron is the placed within the frame of the coil.A concave mirror is attached to the suspension to note the deflection of the coil using length and scale arrangement.

SQL - Difference between CAST,CONVERT and PARSE

TODO---