Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Dim senderTyp As System.Type = sender.GetType()
TryCast(sender, senderTyp)
Select Case sender.GetType.ToString
Case "Button"
Case "ListBox"
Case "Label"
Case Else
End Select
this.myTextBox1.Leave += new System.EventHandler(this.funktionsname);
this.myTextBox2.Leave += new System.EventHandler(this.funktionsname);
this.myComboBox1.Leave += new System.EventHandler(this.funktionsname);
this.myComboBox2.Leave += new System.EventHandler(this.funktionsname);
this.myListBox1.Leave += new System.EventHandler(this.funktionsname);
this.myListBox2.Leave += new System.EventHandler(this.funktionsname);
private void funktionsname(object sender, EventArgs e)
{
((sender.getType())sender).onLeave();
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
A objA = new A();
B objB = new B();
Test(objA);
Test(objB);
Console.ReadLine();
}
public static void Test(object sender)
{
((ITest)sender).Print();
}
}
class A : ITest
{
public void Print()
{
Console.WriteLine("A");
}
}
class B : ITest
{
public void Print()
{
Console.WriteLine("B");
}
}
public interface ITest
{
void Print();
}
}