blob: cbef2d2bc5c105a227e7fbfdd6bbfea8c41e4163 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Collections.Generic;
using System.Text;
namespace StructInClass
{
class StructInClass
{
}
class TestClass
{
public struct TheStruct
{
public string fieldinStruct;
}
static void StructTaker_Inline(TheStruct Struct)
{
Struct.fieldinStruct = "xyz";
}
static int Main(string[] args)
{
try
{
TestClass newobj = new TestClass();
TheStruct s = new TheStruct();
StructTaker_Inline(s);
return 100;
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return 666;
}
}
}
}
|