Remove unused var and declare variables first to fix msvc build.
[mono/afaerber.git] / samples / embed / invoke.cs
blob19e2775d3a5cc86d6e0111a1a5512e9bddd3d60a
1 using System;
3 namespace Embed {
4 class MyType {
5 int val = 5;
6 string str = "hello";
8 MyType () {
9 Console.WriteLine ("In ctor val is: {0}", val);
10 Console.WriteLine ("In ctor str is: {0}", str);
13 MyType (int v, byte[] array) {
14 Console.WriteLine ("In ctor (int, byte[]) got value: {0}, array len: {1}", v, array.Length);
17 void method () {
18 Console.WriteLine ("In method val is {0}", val);
19 Console.WriteLine ("In method str is: {0}", str);
22 int Value {
23 get {
24 return val;
28 string Message {
29 get {
30 return str;
34 void Values (ref int v, ref string s) {
35 Console.WriteLine ("In Values () v is {0}", v);
36 Console.WriteLine ("In Values () s is: {0}", s);
37 v = val;
38 s = str;
41 static void Fail () {
42 throw new Exception ();
45 static void Main () {
46 /* we do nothing here... */