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

test-919.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f5338e7beec11a53c6b058584f0bd3f6e7dd52f8 (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
// Compiler options: -unsafe

class Test
{
	public static void Main (string[] args)
	{
		string s = "hello, world!";
		Outer (s);
	}

	static void Outer (string s)
	{
		unsafe {
			fixed (char* sp = s) {
				char* p = sp;
				Inner (ref p, sp);
			}
		}
	}

	static unsafe void Inner (ref char* p, char* sp)
	{
		++sp;
		p = sp;
	}
}