[.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:
Raul Santos 2024-12-21 02:28:59 +01:00
parent 89001f91d2
commit 072ff85f82
No known key found for this signature in database
GPG key ID: B532473AE3A803E4
17 changed files with 73 additions and 73 deletions

View file

@ -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)