Show / Hide Table of Contents

Class CSharpProperty

A property on a CSharpInterface or CSharpClass.

Inheritance
Object
CSharpProperty
Namespace: NanoByte.CodeGeneration
Assembly: NanoByte.CodeGeneration.dll
Syntax
public class CSharpProperty : Object

Constructors

CSharpProperty(CSharpIdentifier, String)

Creates a new property.

Declaration
public CSharpProperty(CSharpIdentifier type, string name)
Parameters
Type Name Description
CSharpIdentifier type

The type of the property.

String name

The name of the property.

Properties

Attributes

Attributes to apply to the property.

Declaration
public List<CSharpAttribute> Attributes { get; }
Property Value
Type Description
List<CSharpAttribute>

GetterExpression

An expression body for the property's getter.

Declaration
public CSharpConstructor GetterExpression { get; set; }
Property Value
Type Description
CSharpConstructor

HasSetter

Indicates whether the property has a setter.

Declaration
public bool HasSetter { get; set; }
Property Value
Type Description
Boolean

Initializer

The property's initializer (sets default value).

Declaration
public CSharpConstructor Initializer { get; set; }
Property Value
Type Description
CSharpConstructor

Name

The name of the property.

Declaration
public string Name { get; }
Property Value
Type Description
String

Summary

A summary used for an XML documentation comment.

Declaration
public string Summary { get; set; }
Property Value
Type Description
String

Type

The type of the property.

Declaration
public CSharpIdentifier Type { get; }
Property Value
Type Description
CSharpIdentifier

Methods

ToString()

Returns the name of the property.

Declaration
public override string ToString()
Returns
Type Description
String
In This Article
Back to top Copyright Bastian Eicher