Answers for "eventos c#"

C#
1

eventos c#

public class EventoArgs
{
  	public string Texto {get;}
  	public EventoArgs(string texto)
	{
    this.Texto = texto;  
	}  
}


public delegate void ManejadorEventosEjemplo(object sender, EventoArgs e)

  public class ClasePrueba
{
  public event ManejadorEventosEjemplo EventoEjemplo;
  
  protected virtual void LlamarEvento()
  {
    EventoEjemplo?.Invoke(this, new EventoArgs("Hola"));
  } 
}
Posted by: Guest on June-25-2020

C# Answers by Framework

Browse Popular Code Answers by Language