Click or drag to resize

LdClientBoolVariation Method

Calculates the boolean value of a feature flag for a given user.

Namespace:  LaunchDarkly.Client
Assembly:  LaunchDarkly.ServerSdk (in LaunchDarkly.ServerSdk.dll) Version: 5.14.0
public bool BoolVariation(
	string key,
	User user,
	bool defaultValue = false


Type: SystemString
the unique feature key for the feature flag
Type: LaunchDarkly.ClientUser
the end user requesting the flag
defaultValue (Optional)
Type: SystemBoolean
the default value of the flag

Return Value

Type: Boolean
the variation for the given user, or defaultValue if the flag cannot be evaluated


ILdClientBoolVariation(String, User, Boolean)

If the flag variation does not have a boolean value, defaultValue is returned.

If an error makes it impossible to evaluate the flag (for instance, the feature flag key does not match any existing flag), defaultValue is returned.

See Also