.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

66 lines
1007 B

// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System;
using System.Text;
public class PropertiesAndEvents
{
public event EventHandler AutomaticEvent;
[field: NonSerialized]
public event EventHandler AutomaticEventWithInitializer = delegate
{
}
;
public event EventHandler CustomEvent
{
add
{
this.AutomaticEvent += value;
}
remove
{
this.AutomaticEvent -= value;
}
}
public int AutomaticProperty
{
get;
set;
}
public int CustomProperty
{
get
{
return this.AutomaticProperty;
}
set
{
this.AutomaticProperty = value;
}
}
public int Getter(StringBuilder b)
{
return b.Length;
}
public void Setter(StringBuilder b)
{
b.Capacity = 100;
}
public char IndexerGetter(StringBuilder b)
{
return b[50];
}
public void IndexerSetter(StringBuilder b)
{
b[42] = 'b';
}
}