PropertyInformation.IsRequired Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets a value specifying whether the configuration attribute is required.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public bool IsRequired { get; }

Property Value

Type: System.Boolean

true if the PropertyInformation object is required; otherwise, false.

The following code example demonstrates how to use the IsRequired property. This code example is part of a larger example provided for the PropertyInformation class.

// Display the IsRequired property.
Console.WriteLine("IsRequired: {0}", propertyItem.IsRequired);

.NET Framework
Available since 2.0
Return to top