Posts

Showing posts from December, 2012

Assembly in Dot Net C#

Assembly  --------------------  Assembly is the final output after  twice-compilation of all C# codes.  W.r.t Program Access, assemlies can be  classified into 2 - types.  • Private Assembly  • Shared Assembly.  Private Assembly  ---------------------  The default assembly created is 'private assembly'.  A private assembly is limited to one application only.  The private assembly should be kept at \Bin folder  of an ASP.NET application.  Shared Assembly  ---------------------  A shared Assembly is usable by all applications  within the system.  All shared assemblies are LISTED in GAC ['Jack']   - Global Assembly Cache  GAC Folder is:   C:\Windows\assembly\  A 'private assembly' can be made 'shared assembly'.  How To Make a Private Assembly - Shared  -----------------------------------------------------  Only a 'Strong Named Private Assembly' can be made 'shared'.  --------  Step - 1  ------------  Generate 'Str

Reflection in Dot Net

GET ASSEMBLY(Currently executing OR With Location) INFORMATION   Add following NameSpace using System.Reflection;   Now write code in code file as per your requirement.           string strFile_URL_Path = string.Empty;         string strFilePath = string.Empty;         string strVersionNo = string.Empty;         string strAssemblyName = string.Empty;         string strCultureInfo = string.Empty;         //Find Information Of Executing Assembly         Version v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;       //GET VERSION NO         strVersionNo = v.ToString();         strCultureInfo = System.Reflection.Assembly.GetExecutingAssembly().GetName().CultureInfo.ToString();         object[] ar = new object[] { };         ar = System.Reflection.Assembly.GetExecutingAssembly().GetReferencedAssemblies();   //Get All Referenced Assembly Object From Current assembly         //Find Information With Location of assembly         AssemblyName anm =