Skip to content

Commit d80b3b1

Browse files
CopilotBillWagner
andcommitted
Improve CS0430 extern alias example to show actual usage
Co-authored-by: BillWagner <[email protected]>
1 parent 48ef125 commit d80b3b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/csharp/misc/cs0430.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ The extern alias 'alias' was not specified in a /reference option
1919
```csharp
2020
// CS0430_a.cs
2121
// compile with: /target:library
22-
public class MyClass {}
22+
public class MyClass
23+
{
24+
public static void M() { /*...*/ }
25+
}
2326
```
2427

2528
## Example 2
@@ -31,6 +34,6 @@ public class MyClass {}
3134
extern alias MyType; // CS0430
3235
public class Test
3336
{
34-
public static void Main() {}
37+
public static void Main() { MyType::MyClass.M(); }
3538
}
3639
```

0 commit comments

Comments
 (0)