diff options
author | Raul Santos <raulsntos@gmail.com> | 2023-01-31 18:21:09 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2023-01-31 19:04:07 +0100 |
commit | 7eb832518081f15477150c561d6767fe35d17221 (patch) | |
tree | e13d1d0502d6290571daf441d41e1449e0c5f232 /doc/classes/Dictionary.xml | |
parent | 8612c12be61c0bc50d9039402fe19cabadfe0b16 (diff) | |
download | redot-engine-7eb832518081f15477150c561d6767fe35d17221.tar.gz |
Fix C# examples in documentation
- Fix documentation after C# renames.
- Add missing `partial` in C# class declarations.
- Change `delta` parameter type to `double` in C#.
- Ensure parameters match base declaration.
- Use `$` string interpolation in C#.
- Fix invalid or outdated C# code.
- Changed some examples to follow our style guide more closely.
Diffstat (limited to 'doc/classes/Dictionary.xml')
-rw-r--r-- | doc/classes/Dictionary.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 1591aa59bf..a5a50b4c6a 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -51,7 +51,7 @@ [csharp] [Export(PropertyHint.Enum, "White,Yellow,Orange")] public string MyColor { get; set; } - public Godot.Collections.Dictionary pointsDict = new Godot.Collections.Dictionary + private Godot.Collections.Dictionary _pointsDict = new Godot.Collections.Dictionary { {"White", 50}, {"Yellow", 75}, @@ -60,7 +60,7 @@ public override void _Ready() { - int points = (int)pointsDict[MyColor]; + int points = (int)_pointsDict[MyColor]; } [/csharp] [/codeblocks] |