Click here to Skip to main content
15,921,606 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamically instantiating a type and validating interface implementation Pin
m@u12-Dec-07 5:22
m@u12-Dec-07 5:22 
GeneralRe: Dynamically instantiating a type and validating interface implementation Pin
Le centriste12-Dec-07 5:54
Le centriste12-Dec-07 5:54 
Generaldeclaring form Pin
arkiboys12-Dec-07 4:35
arkiboys12-Dec-07 4:35 
GeneralRe: declaring form Pin
Kristian Sixhøj12-Dec-07 5:31
Kristian Sixhøj12-Dec-07 5:31 
GeneralRe: declaring form Pin
arkiboys12-Dec-07 5:50
arkiboys12-Dec-07 5:50 
GeneralRe: declaring form Pin
Kristian Sixhøj12-Dec-07 6:47
Kristian Sixhøj12-Dec-07 6:47 
GeneralRe: declaring form Pin
Sathesh Sakthivel12-Dec-07 6:58
Sathesh Sakthivel12-Dec-07 6:58 
GeneralRe: declaring form Pin
Luc Pattyn12-Dec-07 7:31
sitebuilderLuc Pattyn12-Dec-07 7:31 
Hi,

assuming frmHistory and frmHistoryDetails are rather similar, they should have a common ancestor
(they both inherit from a third class, or one would inherit from the other), I'll call it FormCommon.

Then do:
FormCommon newForm=null;
if (strReportName == PRICEHISTORY) newForm=new frmHistoryDetails();
else if (strReportName == PRICEHISTORYBEST) newForm=new fmrHistory();
if (newForm!=null) {
    newForm.ReportNameGet(strReportName.ToLower());
    newForm.SecurityID = intSecurityID;// Provide the SecurityID to the new form. 
    newForm.ShowDialog();// Show the form.
    newForm.Dispose();
}


BTW: ToString() is redundant in ToLower().ToString()

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


Sorry for any delays in replying, I currently don't always get e-mail notifications.


QuestionCan radio button text be set at left instead of right Pin
MANOJ BATRA12-Dec-07 4:28
MANOJ BATRA12-Dec-07 4:28 
AnswerRe: Can radio button text be set at left instead of right Pin
c0ax_lx12-Dec-07 5:20
c0ax_lx12-Dec-07 5:20 
QuestionHow to change panel and form border color at design time Pin
MANOJ BATRA12-Dec-07 4:11
MANOJ BATRA12-Dec-07 4:11 
QuestionHow to get all ButtonItem in RibbonControl of DevComponents.DotNetBar Pin
RockPhoenix12-Dec-07 2:57
RockPhoenix12-Dec-07 2:57 
GeneralSerializaion and XML Serialization issue Pin
manustone12-Dec-07 1:45
manustone12-Dec-07 1:45 
GeneralRe: Serializaion and XML Serialization issue Pin
TJoe12-Dec-07 4:12
TJoe12-Dec-07 4:12 
GeneralRe: Serializaion and XML Serialization issue Pin
Skippums12-Dec-07 5:52
Skippums12-Dec-07 5:52 
GeneralCross Thread Calls Pin
MicealG12-Dec-07 0:55
MicealG12-Dec-07 0:55 
GeneralRe: Cross Thread Calls Pin
Pete O'Hanlon12-Dec-07 2:00
mvePete O'Hanlon12-Dec-07 2:00 
AnswerRe: Cross Thread Calls Pin
MicealG12-Dec-07 3:00
MicealG12-Dec-07 3:00 
General"Step-over", "Step-into" not working with multiple threads Pin
pmartike12-Dec-07 0:49
pmartike12-Dec-07 0:49 
GeneralRe: "Step-over", "Step-into" not working with multiple threads Pin
ChrisKo12-Dec-07 7:57
ChrisKo12-Dec-07 7:57 
GeneralRe: "Step-over", "Step-into" not working with multiple threads Pin
pmartike12-Dec-07 19:37
pmartike12-Dec-07 19:37 
QuestionHow DataTable Export into Excel file? Pin
pekhaleyogesh12-Dec-07 0:47
pekhaleyogesh12-Dec-07 0:47 
AnswerRe: How DataTable Export into Excel file? Pin
Sun Rays12-Dec-07 1:23
Sun Rays12-Dec-07 1:23 
GeneralDataView wont filter in loop Pin
Scalee12-Dec-07 0:46
Scalee12-Dec-07 0:46 
GeneralRe: DataView wont filter in loop Pin
Paul Conrad23-Dec-07 9:57
professionalPaul Conrad23-Dec-07 9:57 

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.