Created
July 15, 2012 15:43
-
-
Save kamukiriri/3117499 to your computer and use it in GitHub Desktop.
ジェネリックメソッド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Method<T>() | |
where T:A | |
{ | |
Type type = typeof(T); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ShowForm<T>() | |
where T : Form, new() | |
{ | |
Form form = new T(); | |
form.Show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment