Skip to content

InterfaceProperty

Render a C# interface property.

import { InterfaceProperty } from "@alloy-js/csharp";
<InterfaceProperty
doc={Children}
file
get
internal
name="string"
new
nullable
private
protected
public
refkey={Refkey}
set
type={Children}
/>

Props

docoptionalChildren

Doc comment

fileoptionalboolean
getoptionalboolean

If property should have a getter

internaloptionalboolean
namestring
newoptionalboolean
nullableoptionalboolean

Property initializer

privateoptionalboolean
protectedoptionalboolean
publicoptionalboolean
refkeyoptionalRefkey
setoptionalboolean

If property should have a setter

typeChildren

Property type

Example

<InterfaceProperty public name="My" get set />

public int My { get; set; };