[.NET] Use collection expressions in docs
As of C# 12 we can now use collection expressions to reduce some boilerplate when initializing collections.
This commit is contained in:
parent
89001f91d2
commit
072ff85f82
17 changed files with 73 additions and 73 deletions
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
public override string[] _GetRecognizedExtensions()
|
||||
{
|
||||
return new string[] { "special", "spec" };
|
||||
return ["special", "spec"];
|
||||
}
|
||||
|
||||
public override string _GetSaveExtension()
|
||||
|
|
@ -88,14 +88,14 @@
|
|||
|
||||
public override Godot.Collections.Array<Godot.Collections.Dictionary> _GetImportOptions(string path, int presetIndex)
|
||||
{
|
||||
return new Godot.Collections.Array<Godot.Collections.Dictionary>
|
||||
{
|
||||
return
|
||||
[
|
||||
new Godot.Collections.Dictionary
|
||||
{
|
||||
{ "name", "myOption" },
|
||||
{ "default_value", false },
|
||||
}
|
||||
};
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
public override Error _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array<string> platformVariants, Godot.Collections.Array<string> genFiles)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue