FieldBuilder.SetConstantCore(Object) Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

When overridden in a derived class, sets the default value of this field.

C#
protected abstract void SetConstantCore(object? defaultValue);

Parameters

defaultValue
Object

The new default value for this field.

Applies to

Product Versions
.NET 8, 9, 10