-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from stride3d/master
Releasing recent docs updates
- Loading branch information
Showing
19 changed files
with
887 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Diagnostics Warning STRD002 | ||
|
||
A collection must have a public/internal getter for Serialization. | ||
|
||
## Example | ||
|
||
The following example generates STRD001: | ||
|
||
```csharp | ||
// STRD001.cs | ||
// compile with: /W:2 | ||
public class Program | ||
{ | ||
public static void Main() | ||
{ | ||
goto lab1; | ||
{ | ||
// The following statements cannot be reached: | ||
int i = 9; // STRD001 | ||
i++; | ||
} | ||
lab1: | ||
{ | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
Another common example where this error is generated is as follows: | ||
|
||
```csharp | ||
public static class Class1 | ||
{ | ||
public static string Method1() | ||
{ | ||
string x = "a"; | ||
switch (x) | ||
{ | ||
case "a": | ||
return "a"; | ||
break; // CS0162 | ||
} | ||
return ""; | ||
} | ||
} | ||
``` | ||
|
||
The `break` statement cannot be reached because it occurs after the `return` statement. The `return` statement ends the enclosing `case` branch. | ||
|
||
## See also | ||
|
||
- [C# Compiler Options](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/) | ||
- [C# Compiler Errors](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Diagnostics Warning STRD003 | ||
|
||
- A property must have a public/internal getter. | ||
- A property must be set during instantiation, then no public setter would be valid. | ||
- Or it must have a public setter else. | ||
|
||
## Example | ||
|
||
The following example generates STRD001: | ||
|
||
```csharp | ||
// STRD001.cs | ||
// compile with: /W:2 | ||
public class Program | ||
{ | ||
public static void Main() | ||
{ | ||
goto lab1; | ||
{ | ||
// The following statements cannot be reached: | ||
int i = 9; // STRD001 | ||
i++; | ||
} | ||
lab1: | ||
{ | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
Another common example where this error is generated is as follows: | ||
|
||
```csharp | ||
public static class Class1 | ||
{ | ||
public static string Method1() | ||
{ | ||
string x = "a"; | ||
switch (x) | ||
{ | ||
case "a": | ||
return "a"; | ||
break; // CS0162 | ||
} | ||
return ""; | ||
} | ||
} | ||
``` | ||
|
||
The `break` statement cannot be reached because it occurs after the `return` statement. The `return` statement ends the enclosing `case` branch. | ||
|
||
## See also | ||
|
||
- [C# Compiler Options](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/) | ||
- [C# Compiler Errors](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Diagnostics Warning STRD004 | ||
|
||
For <see cref="System.Collections.Generic.Dictionary{TKey, TValue}"/> the only valid Keys are primitive Types. All complex types like custom structs, objects are not allowed. | ||
|
||
## Example | ||
|
||
The following example generates STRD001: | ||
|
||
```csharp | ||
// STRD001.cs | ||
// compile with: /W:2 | ||
public class Program | ||
{ | ||
public static void Main() | ||
{ | ||
goto lab1; | ||
{ | ||
// The following statements cannot be reached: | ||
int i = 9; // STRD001 | ||
i++; | ||
} | ||
lab1: | ||
{ | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
Another common example where this error is generated is as follows: | ||
|
||
```csharp | ||
public static class Class1 | ||
{ | ||
public static string Method1() | ||
{ | ||
string x = "a"; | ||
switch (x) | ||
{ | ||
case "a": | ||
return "a"; | ||
break; // CS0162 | ||
} | ||
return ""; | ||
} | ||
} | ||
``` | ||
|
||
The `break` statement cannot be reached because it occurs after the `return` statement. The `return` statement ends the enclosing `case` branch. | ||
|
||
## See also | ||
|
||
- [C# Compiler Options](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/) | ||
- [C# Compiler Errors](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Diagnostics Warning STRD007 | ||
|
||
It's invalid to DataMember a private property. Also its invalid to DataMember a property which has DataMemberIgnore. | ||
|
||
## Example | ||
|
||
The following example generates STRD001: | ||
|
||
```csharp | ||
// STRD001.cs | ||
// compile with: /W:2 | ||
public class Program | ||
{ | ||
public static void Main() | ||
{ | ||
goto lab1; | ||
{ | ||
// The following statements cannot be reached: | ||
int i = 9; // STRD001 | ||
i++; | ||
} | ||
lab1: | ||
{ | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
Another common example where this error is generated is as follows: | ||
|
||
```csharp | ||
public static class Class1 | ||
{ | ||
public static string Method1() | ||
{ | ||
string x = "a"; | ||
switch (x) | ||
{ | ||
case "a": | ||
return "a"; | ||
break; // CS0162 | ||
} | ||
return ""; | ||
} | ||
} | ||
``` | ||
|
||
The `break` statement cannot be reached because it occurs after the `return` statement. The `return` statement ends the enclosing `case` branch. | ||
|
||
## See also | ||
|
||
- [C# Compiler Options](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/) | ||
- [C# Compiler Errors](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# [Diagnostics](index.md) | ||
|
||
# [STRD001](strd001.md) | ||
# [STRD001](strd001.md) | ||
# [STRD002](strd002.md) | ||
# [STRD003](strd003.md) | ||
# [STRD004](strd004.md) | ||
# [STRD007](strd007.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.