Click here to Skip to main content
15,910,471 members
Home / Discussions / C#
   

C#

 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid10-Jul-07 4:21
liyakhat_shahid10-Jul-07 4:21 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
Martin#10-Jul-07 4:42
Martin#10-Jul-07 4:42 
GeneralRe: File Conversion from CSV format Excel format in C# Pin
liyakhat_shahid11-Jul-07 19:50
liyakhat_shahid11-Jul-07 19:50 
AnswerRe: File Conversion from CSV format Excel format in C# Pin
Ed.Poore10-Jul-07 5:15
Ed.Poore10-Jul-07 5:15 
Questionsearch dialog Pin
topksharma198210-Jul-07 2:59
topksharma198210-Jul-07 2:59 
AnswerRe: search dialog Pin
Luc Pattyn10-Jul-07 3:07
sitebuilderLuc Pattyn10-Jul-07 3:07 
GeneralRe: search dialog Pin
topksharma198210-Jul-07 4:07
topksharma198210-Jul-07 4:07 
GeneralRe: search dialog Pin
Luc Pattyn10-Jul-07 4:18
sitebuilderLuc Pattyn10-Jul-07 4:18 
GeneralRe: search dialog Pin
Luc Pattyn10-Jul-07 4:20
sitebuilderLuc Pattyn10-Jul-07 4:20 
AnswerRe: search dialog Pin
mav.northwind10-Jul-07 3:40
mav.northwind10-Jul-07 3:40 
QuestionHow to show a bookmarked position in default browser? Pin
mav.northwind10-Jul-07 2:18
mav.northwind10-Jul-07 2:18 
AnswerRe: How to show a bookmarked position in default browser? Pin
Luc Pattyn10-Jul-07 2:46
sitebuilderLuc Pattyn10-Jul-07 2:46 
GeneralRe: How to show a bookmarked position in default browser? Pin
mav.northwind10-Jul-07 3:34
mav.northwind10-Jul-07 3:34 
GeneralRe: How to show a bookmarked position in default browser? Pin
Luc Pattyn10-Jul-07 4:00
sitebuilderLuc Pattyn10-Jul-07 4:00 
GeneralRe: How to show a bookmarked position in default browser? Pin
mav.northwind10-Jul-07 4:24
mav.northwind10-Jul-07 4:24 
QuestionGeneric parameter/reflection problem Pin
Bekjong10-Jul-07 1:46
Bekjong10-Jul-07 1:46 
AnswerRe: Generic parameter/reflection problem Pin
Pete O'Hanlon10-Jul-07 1:59
mvePete O'Hanlon10-Jul-07 1:59 
GeneralRe: Generic parameter/reflection problem Pin
Bekjong10-Jul-07 2:08
Bekjong10-Jul-07 2:08 
GeneralRe: Generic parameter/reflection problem Pin
Pete O'Hanlon10-Jul-07 2:32
mvePete O'Hanlon10-Jul-07 2:32 
GeneralRe: Generic parameter/reflection problem Pin
Bekjong10-Jul-07 2:41
Bekjong10-Jul-07 2:41 
AnswerRe: Generic parameter/reflection problem Pin
Chintan.Desai10-Jul-07 2:08
Chintan.Desai10-Jul-07 2:08 
GeneralRe: Generic parameter/reflection problem Pin
Bekjong10-Jul-07 2:22
Bekjong10-Jul-07 2:22 
GeneralRe: Generic parameter/reflection problem Pin
Le centriste10-Jul-07 2:38
Le centriste10-Jul-07 2:38 
AnswerRe: Generic parameter/reflection problem Pin
AFSEKI10-Jul-07 6:26
AFSEKI10-Jul-07 6:26 
Dictionary<string, form=""> pool = new Dictionary<string, form="">(10);
pool.Add("myformid", new LoginForm());
pool.Add("myAboutformid", new AboutForm());

public class LoginForm : Form
{
}
public class AboutForm : Form
{
}

Type typLoginForm = typeof(LoginForm);
LoginForm lf = GetForm<typloginform>("myformid");
lf.ShowDialog();

public T GetForm<t>(string form_id) where T: Form
{
return pool[form_id] as T;
}

You can change the Dictionary<string,form> to Dictionary<string, collection<form="">> to add more than 1 item under the same key. Or Dictionary<type, collection<form="">> to get a pool item with its type instead of form_id value which is string.

Fire and Water, Love and Death, Sex and the City? Smile | :)
GeneralRe: Generic parameter/reflection problem Pin
Bekjong10-Jul-07 22:05
Bekjong10-Jul-07 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.