Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetValidValue Method (String, Boolean, String)
Collapse the table of content
Expand the table of content

StructuralObject.SetValidValue Method (String, Boolean, String)

.NET Framework 4.6 and 4.5

Validates that the property is not null, and throws if it is.

Namespace:  System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

protected internal static string SetValidValue(
	string value,
	bool isNullable,
	string propertyName
)

Parameters

value
Type: System.String

The string value to be checked.

isNullable
Type: System.Boolean

Flag indicating if this property is allowed to be null.

propertyName
Type: System.String

The name of the property that is being validated.

Return Value

Type: System.String
The validated property.

ExceptionCondition
ConstraintException

The string value is null for a non-nullable string.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft