CSharp.WriteConstantValue Method

Namespace
Kampute.DocToolkit.Languages
Assembly
  • Kampute.DocToolkit.dll

Definition

Writes a constant value formatted according to C# syntax rules to the provided TextWriter.
public virtual void WriteConstantValue(
	TextWriter writer,
	object value,
	IType valueType = null,
	MemberDocLinker linker = null)

Parameters

writer TextWriter
The TextWriter to which the constant value is written.
value object
The value to be formatted as a constant and written.
valueType IType optional
The type of the value to be written. If null, the type is inferred from the value.
linker MemberDocLinker optional
An optional delegate for linking to the documentation of a type or type's member.

Exceptions

ArgumentNullException
Thrown when writer is null.
ArgumentException
Thrown when the value is not a constant value.