Open
Description
Feature Description:
If it's possible to implement, it would be nice for UdonSharp to support C#'s DeclarationExpression
for methods with out parameters, such as int.TryParse
. This would allow the following code:
int someValue;
if (int.TryParse(inputField.text, out someValue))
{
// do something with someValue
}
to be condensed into:
if (int.TryParse(inputField.text, out var someValue))
{
// do something with someValue
}
Should probably also support the discard syntax:
var isNumberValid = int.TryParse(inputField.text, out _);
I know it's only a minor improvement to convenience, but it'd be nice to have if it's an easy addition.