Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is application domain?

Answer Posted / bsatish

AppDomains are usually created by hosts. Examples of hosts
are the Windows Shell, ASP.NET and IE. When you run a .NET
application from the command-line, the host is the Shell.
The Shell creates a new AppDomain for every application.
AppDomains can also be explicitly created by .NET
applications. Here is a C# sample which creates an
AppDomain, creates an instance of an object inside it, and
then executes one of the object's methods. Note that you
must name the executable 'appdomaintest.exe' for this code
to work as-is.
• using System;
• using System.Runtime.Remoting;

• public class CAppDomainInfo : MarshalByRefObject
• {
• public string GetAppDomainInfo()
• {
• return "AppDomain = " +
AppDomain.CurrentDomain.FriendlyName;
• }
• }
• public class App
• {
• public static int Main()
• {
• AppDomain ad =
AppDomain.CreateDomain( "Andy's new domain", null, null );
• ObjectHandle oh = ad.CreateInstance
( "appdomaintest", "CAppDomainInfo" );
• CAppDomainInfo adInfo =
(CAppDomainInfo)(oh.Unwrap());
• string info =
adInfo.GetAppDomainInfo();
• Console.WriteLine( "AppDomain
info: " + info );
• return 0;
• }
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using c#?

923


If you define a user defined data type by using the class keyword, is it a value type or reference type?

866


What is cli in c#?

927


What is default parameter in c#?

952


What does int32 mean?

874


What do u mean by delegation?

920


What is the default value of guid in c#?

864


Which are the access modifiers available in c#?

937


What is Garbage Collection in .Net?

1021


what optimizations does the c# compiler perform when you use the /optimize+ compiler option?

1039


In which format you can pass the value in the sleep function?

909


What all details the assembly manifest will contain?

814


Explain the advantage of using system.text.stringbuilder over system.string?

865


Write a short note on interface?

971


Can a struct have a default constructor (a constructor without parameters) or a destructor in c#?

956