Last active
August 29, 2015 14:02
-
-
Save Fhernd/2b213b19a28ce955e499 to your computer and use it in GitHub Desktop.
Demostración del método SetData de la clase AppDomain.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
namespace Recetas.Cap03 | |
{ | |
public class UsoSetData | |
{ | |
public static void Main() | |
{ | |
// Creación de dominio de aplicación: | |
AppDomain nuevoAppDomain = AppDomain.CreateDomain("NuevoAppDomain"); | |
// Establecimiento de nombre a través del | |
// método `SetData`: | |
nuevoAppDomain.SetData("TemaColores", "Negro"); | |
// Visualizamos el valor del dato a través del | |
// método `GetData` de AppDomain: | |
Console.WriteLine("Valor de nombre `TemaColores`: {0}", | |
nuevoAppDomain.GetData("TemaColores")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment