Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-171.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 21fc85915a4cf5b00530e4d15f1238aa6f00ac64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Compiler options: -unsafe

//
// Checks for an implicit void * conversion during an
// explicit conversion
//

using System;

namespace IntPtr_Conv
{
	struct FooStruct {
		int x;
	}

	class Class1 {
		
		static int Main(string[] args)
		{
			IntPtr p = IntPtr.Zero;

			unsafe {
				FooStruct* s = (FooStruct*) (p);
			}

			return 0;
		}
	}
}