EnumExtensions TryParse T  Method Delta Engine Documentation
Tries to convert any text to a enum, if it fails defaultValue is returned. If you know the text will be in the correct format use . Convert T (String)View code on GitHub

Namespace: DeltaEngine.Extensions
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public static T TryParse<T>(
	this string text,
	T defaultValue
)
where T : struct, new()
Type Parameters

T

Return Value

Type: T

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