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:
parent
2e273f0e35
commit
6723b4e8c3
3 changed files with 9 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue