BACnet.SchemaCompiler.CodeGen.CSharpTypeGenerator.CSharpEmitter.StaticReadonlyField C# (CSharp) Method

StaticReadonlyField() public method

Creates a static readonly field
public StaticReadonlyField ( string name, string type, string initializer, Access access = Access.Public, bool @new = false ) : void
name string The name of the field
type string The type of the field
initializer string
access Access The access specifier for the field
@new bool
return void
            public void StaticReadonlyField(string name, string type, string initializer, Access access = Access.Public, bool @new = false)
            {
                WriteLine("{0} static readonly {1}{2} {3} = {4};",
                    access.ToAccessString(),
                    @new ? "new " : string.Empty,
                    type,
                    name,
                    initializer);
            }