Skip to content

Commit af447e3

Browse files
CopilotBillWagner
andauthored
Improve CS0430 extern alias documentation with practical usage examples (#47708)
* Initial plan * Improve CS0430 extern alias example to show actual usage Co-authored-by: BillWagner <[email protected]> * Add cross-reference to extern alias documentation Co-authored-by: BillWagner <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BillWagner <[email protected]>
1 parent 89db11c commit af447e3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/csharp/misc/cs0430.md

Lines changed: 9 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,10 @@ 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
```
40+
41+
## See also
42+
43+
- [extern alias](../language-reference/keywords/extern-alias.md)

0 commit comments

Comments
 (0)