Exemplo n.º 1
0
 static void Main(string[] args)
 {
     AppDomain.CreateDomain("Example");
     foreach (var domain in CLRUtil.EnumAppDomains())
     {
         Console.WriteLine("Found appdomain {0}", domain.FriendlyName);
     }
     Console.ReadLine();
 }
Exemplo n.º 2
0
        private void btnCLRTest_Click(object sender, EventArgs e)
        {
            CLRUtil util = new CLRUtil();

            CLRUtil.Sample sample;
            sample.InputArr = new byte[10];

            for (int i = 0; i < sample.InputArr.Length; i++)
            {
                sample.InputArr[i] = (byte)i;
            }

            sample.test        = 50;
            sample.stringValue = "Hello";

            string stringValue = string.Empty;
            int    intValue    = 0;
            double doubleValue = 0;

            byte[] inputArr  = new byte[255];
            byte[] outputArr = null;
            for (int i = 0; i < inputArr.Length; i++)
            {
                inputArr[i] = (byte)i;
            }

            util.FunctionTest(
                ref stringValue,
                ref intValue,
                ref doubleValue,
                inputArr,
                ref outputArr,
                sample);

            Console.WriteLine($"stringValue : {stringValue} , intValue : {intValue} , doubleValue : {doubleValue} , .stringValue : {sample.stringValue}");
        }