Skip to content

Commit 9ac2ebb

Browse files
committed
test/import/csharp/properties.cs : New file tests C# properties.
CCBUG: 375223
1 parent c28f11f commit 9ac2ebb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/import/csharp/properties.cs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Tests the following CSharpImport features:
3+
* Properties https://bugs.kde.org/show_bug.cgi?id=375223
4+
* Mapping of array of primitive type to predefined datatype
5+
* Mapping of .NET alias type to native C# type
6+
*/
7+
public class Properties
8+
{
9+
public int property1 { get; set; }
10+
11+
// map to array type in Umbrello "Datatypes" folder (without creating a new type)
12+
public string[] property2 { get; set; }
13+
14+
// map to type "nint" in Umbrello "Datatypes" folder (without creating a new type)
15+
public System.IntPtr property3 { get; set; }
16+
17+
// Variation of property syntax https://www.w3schools.com/cs/cs_properties.php
18+
private string name; // field
19+
public string Name // property
20+
{
21+
get { return name; }
22+
set { name = value; }
23+
}
24+
}

0 commit comments

Comments
 (0)