Click or drag to resize

StringExtensionsHexToInt Method

Converts a string containing a hexadecimal number into an integer. Hexadecimal strings can either be prefixed with `0x` or not, and they can also start with a `-` before the optional prefix.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static int HexToInt(
	this string instance
)

Parameters

instance
Type: SystemString
The string to convert.

Return Value

Type: Int32
The converted string.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also