mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
C#: Fix dictionary key lookup documentation
The method to check if a key exists in the dictionary is called `ContainsKey`.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
{
|
||||
// Check position if it is relevant to you
|
||||
// Otherwise, just check data
|
||||
return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().Contains("expected");
|
||||
return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("expected");
|
||||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
@@ -64,7 +64,7 @@
|
||||
[csharp]
|
||||
public override bool _CanDropData(Vector2 atPosition, Variant data)
|
||||
{
|
||||
return data.VariantType == Variant.Type.Dictionary && dict.AsGodotDictionary().Contains("color");
|
||||
return data.VariantType == Variant.Type.Dictionary && dict.AsGodotDictionary().ContainsKey("color");
|
||||
}
|
||||
|
||||
public override void _DropData(Vector2 atPosition, Variant data)
|
||||
|
||||
Reference in New Issue
Block a user