Ho una struct, miastruct, desidero inserire un campo che mi consenta la chiamata ad un delegate.
Come Fare ?
public struct miastruct
{
public int campo1;
public int campo2;
public int campo3;
public miastruct(int uno, int due, int tre)
{
campo1=uno;
campo2=due;
campo3=tre;
}
}
public delegate void miodelegate(string value);
class Program
{
....
....
static public void metodo1(string value)
{
Console.Write("valore " + value);
}
miodelegatedelegato= new miodelegate(metodo1);
....
}