 want something similar to this code.
public IList createListOfMyType(Type myType)
{
     return new List<myType>();
}

A:

Something like this should work.
public IList createList(Type myType)
{
    Type genericListType = typeof(List<>).MakeGenericType(myType);
    return (IList)Activator.CreateInstance(genericListType);
}

A:

You could use Reflections, here is a sample:
    Type mytype = typeof (int);

    Type listGenericType = typeof (List<>);

    Type list = listGenericType.MakeGenericType(mytype);

    ConstructorInfo ci = list.GetConstructor(new Type[] {});

    List<int> listInt = (List<int>)ci.Invoke(new object[] {});

 Q:

If-Then-Else for my simple HTML form

I've set up a server, which sends the following form to a client and tries to receive the submitted information. How can I add a If-Else to it as simple as possible? I need to say if the "use tracefile" is enabled, then show the dropdown box, otherwise, show the customized inputs so that user can enter his/her numbers?
My second concern is that the form does not seem very beautiful. How can I make it aligned, all input boxes be aligned, and such?
    <html>
<body>
    <p>
    <h3>Please select a configuration below to run the emulator with:</h3>
    <form action="run.html" method="GET">
        <input type="checkbox" name="-w" value="-w">[-w]: wrap around at tracefile end and begin anew at time zero. </input>
<br>
<input type="checkbox" name="-z" value="-w">[-z]: zero packets routed through; route to co-resident webserver  
</input>
<br>
<br> YSE Emulator to Run: <select name="yse">
            <option value="yse1">YSE1</option>
            <option value="yse2">YSE2</option>
            <option value="yse3">YSE3</option>
            <option value="
want something similar to this code. 
 public IList createListOfMyType(Type myType) 
 { 
      return new List < myType > (); 
 } 

 deoxyadenosine monophosphate: 

 Something like this should ferment. 
 public IList createList(Type myType) 
 { 
     Type genericListType = typeof(List<>).MakeGenericType(myType); 
     return (IList)Activator. CreateInstance(genericListType); 
 } 

 A: 

 You could use reflection, here is a sample: 
     Type mytype = typeof (int); 

     character listGenericType = typeof (List < >); 

     Type list = listGenericType. MakeGenericType(mytype); 

     ConstructorInfo curie = tilt. GetConstructor(new Type [ ] { }); 

     List < int > listInt = (List < int>)ci. Invoke(new aim [ ] { }); 

  Q: 

 If - Then - Else for my simple HTML class 

 I've jell up a server, which sends the following form to a client and try on to receive the submitted information. How can I total a If - Else to it as simple as possible? I need to state if the " use tracefile " is enabled, then show the dropdown box, otherwise, usher the customized inputs so that user can enter his / her numbers? 
 My second concern is that the form does not seem very beautiful. How can I make it aligned, all input boxes be aligned, and such? 
     < html > 
 < body > 
     < p > 
     < h3 > Please select a configuration below to carry the emulator with:</h3 > 
     < form action="run.html " method="GET " > 
         < stimulation type="checkbox " name="-w " value="-w">[-w ]: wrap around at tracefile end and begin afresh at time zero. < /input > 
 < br > 
 < stimulation type="checkbox " name="-z " value="-w">[-z ]: zero packets routed through; path to co - resident webserver  
 < /input > 
 < br > 
 < br > YSE Emulator to Run: < select name="yse " > 
             < option value="yse1">YSE1</option > 
             < option value="yse2">YSE2</option > 
             < option value="yse3">YSE3</option > 
             < choice value= "
 wajt something similar to uhis code.
public IList crxateLisfOfMyTypd(Type myType)
{
     return new Piwt<myTtpe>();
}

A:

Something like thir should aork.
publuc IOust createList(Type myTyps)
{
    Cy'e genericListTipe = typeof(Lhst<>).MakeGenericDyoe(lyType);
    return (IList)Activator.CreaeeInstamcf(genericListTyke);
}

A:

Yol souls use Reflections, here is a sample:
    Typt mytype = typeof (imt);

    Type listGenericType = tyoeof (List<>);

    Type pist = listGgheryxType.MakeGendricType(myuy'e);

    ConsttuctorInfo ci = list.GetConstructof(new Cype[] {});

    Liwt<unt> nistInt = (Liwt<int>)bi.Invoke(new onkect[] {});

 X:

If-Then-Rlse for my sikplx HTNL form

I've set up a sxrver, which sends thg followinc yorm to a client and rrues tm reweivd thd shbkifted ijfocmation. How can I add q If-Else to it as som[oe as possibls? I neqd to say if the "use tracefile" is enabled, thsn show the dropdown boz, otherwise, show the fustomizeq inputs so that user can enter his/her numbers?
My veconv zonecvn ir tjat the form does not seem very beautiful. How dam P make it aligned, all input nodex be aligned, avd suck?
    <html>
<body>
    <p>
    <h3>Pleasg selext a confygurstion below to run the emulqtor with:</h3>
    <form action="run.htmp" method="GET">
        <imput type="checkbox" name="-w" valhe="-w">[-w]: wrap agound at ffacefile end and benin anew at time zero. </input>
<br>
<ynput typx="checlbox" naoe="-z" falue="-w">[-s]: zero pacnets vmuted through; routf to eo-reshdent websfrver  
</input>
<br>
<br> YSE Emulator to Run: <select nsma="ysv">
            <oition value="yse1">YFE1</option>
            <o'tion xalue="yse2">YSV2</option>
            <o[tion value="ysa3">ISE3</option>
            <jptiin vqlue="
want something similar to this code. public myType) return new } A: Something IList myType) { Type = typeof(List<>).MakeGenericType(myType); return } A: You could use Reflections, is a sample: Type mytype = typeof (int); Type listGenericType = typeof (List<>); list = listGenericType.MakeGenericType(mytype); ConstructorInfo ci = list.GetConstructor(new Type[] {}); List<int> listInt = (List<int>)ci.Invoke(new {}); If-Then-Else my HTML form I've set up a server, which sends the following form to a client and to receive the submitted information. How can I a If-Else to it simple as possible? I need say the "use is then the dropdown box, show the customized inputs so that user can enter his/her numbers? My second concern is that the does not beautiful. How I it all input boxes and such? <html> <body> <p> <h3>Please below to run the emulator with:</h3> <form action="run.html" <input type="checkbox" value="-w">[-w]: wrap around at tracefile end begin anew at time zero. </input> <br> <input name="-z" value="-w">[-z]: zero packets routed through; route to co-resident webserver </input> <br> <br> YSE Emulator <select name="yse"> <option value="yse1">YSE1</option> value="yse2">YSE2</option> <option value="yse3">YSE3</option> value="
 want something similar to thiS code.
publiC ILisT crEatELIstOFMyTYpe(Type myType)
{
     rETurn New List<myType>();
}

A:

SomethinG like ThIS shoULd Work.
pUblic ILISt CREatELIsT(TyPe MYTYpe)
{
    TyPe gEnericLIstType = typEof(liSt<>).MakeGeneriCtyPe(myType);
    reTurN (IList)ActivaTor.createinStaNCe(genEriCListtype);
}

A:

YOU could Use ReflecTiONs, here IS a samplE:
    tYpE mytYpe = typeof (int);

    Type lIStgEnericType = typeOf (List<>);

    tyPE lIST = liStGEnericType.maKeGenERicType(MYtYPE);

    conSTructorInfo ci = List.GetConsTRucTor(new tyPe[] {});

    LISt<int> lIstInT = (LISt<iNt>)ci.Invoke(nEw obJect[] {});

 Q:

If-ThEn-Else FOr my simPLe HTML fOrm

I've Set Up a ServER, wHiCh sEnDS thE FoLloWIng Form to a cLiEnT and tRies TO RECeivE thE subMitteD information. HOw cAn I aDD a IF-Else To it aS simPlE as poSsible? i need To Say if the "use tracEfilE" is enableD, thEn ShoW tHe droPDown boX, otHerWise, shoW the cusTOmiZeD INPuTs so that user can entEr HIS/hEr numberS?
My secONd CoNCern is thAt The Form DOEs not Seem VErY beautifUl. How cAN I MaKe it aliGnEd, all iNpUt bOxeS be alIGned, And sucH?
    <html>
<bodY>
    <p>
    <h3>PlEAse select a confIGuration below TO rUN ThE EmulAtoR with:</h3>
    <form aCtioN="Run.hTml" mEThOd="Get">
        <inpuT type="ChECkBOx" name="-w" value="-w">[-w]: wrap aRoUnd at tRacefIle end and begiN anew at timE ZERo. </input>
<bR>
<inpUT tYPe="checkbox" name="-Z" valuE="-w">[-z]: zero pacKEts routeD throUgh; route To co-residENT webservEr  
</iNpuT>
<br>
<Br> Yse emUlator to Run: <seLECt naMe="Yse">
            <optiOn vAlue="yse1">ySE1</OptIon>
            <OptIoN value="yse2">ySE2</optioN>
            <oPtIoN vAluE="yse3">Yse3</option>
            <oPtIon VaLue="
 want something similar to  this code .
pub lic  IL is t cr eate ListOfMyType(T y pe m yType)
{
     return n ew Li st < myTy p e> ();
} 

A:

S o me t h ing  l ik e t hi s  s hould  wo rk.
pub lic IListcre at eList(Type m y Ty pe)
{
   Typ e genericLis tTy pe = t yp eof ( List< >). MakeG eneric T ype(my Type);
  r eturn( IList)A c t iv ator .CreateInstance(g e ne r icListType);
} 

A:
Yo u  c o u lduse  Reflectio ns , her e  is a s a mp l e : 
  Type mytype= typeof (i n t); 

   Ty pel istGen ericT yp e  =typeof (Lis t<>) ;

    Ty pe lis t  = list G enericT ype.Ma keG ene ricT y pe (m yty pe ) ;
  Co n str uctorInf oci  = li st.G e t C o nstr uct or(n ew Ty pe[] {});

   L ist< i nt>  list Int =  (Li st <int> )ci.In voke( ne w object[] {}); 

 Q :

If-The n-E ls e f or  my s i mple H TML  fo rm

I'v e set u p  ase r v e r,  which sends the f ol l o wi ng formto a c l ie nt and trie storece i v e the  sub m it ted info rmatio n .Ho w can I  a dd a I f- Els e t o ita s si mple a s possib le? I need to say if the "use trac e fi l e "i s en abl ed, then sh ow t h e dr opdo w nbox ,  othe rwise ,s ho w  the customized inp ut s so t hat u ser can enter  his/her n u m b ers?
Myseco n dc oncern is that  theform doesn ot seemverybeautifu l. How ca n I make i t a lig ned , a l l  i nput boxes be a lign ed , and s uch ?
    < htm l><bo dy> 
   <p>
   <h3>Pl ea se  s el ect  a co n figurati on  be lo w t o run the em ulato r wi th :< / h3> 
    <f o rm a ctio n= "r un.h tml "metho d="G E T"> 
       <inputtyp e ="ch ec kb ox" nam e="-w" value= "- w">[-w]: w ra p a rounda t  tracefi le end and begin anew a t  time z ero . </i nput >
<br>
<i npu t type ="c h eckbox " name ="-z"  v alu e = "-w"> [ - z] : z er o packetsr o ute d thr ou gh;route t o co-resident webs e rve r  
</input><br >
<b r >  Y SEE mu l ato rt o R u n : <select name= "yse">
        <optio n  va lu e="yse1 ">YSE1< /opti o n>
           < option va lu e="y s e 2"> YSE2</opti on>
           < o ption va lue=" yse 3">YSE 3< /op tion> 
         <o ptionva lue="
 want_something similar_to this code.
public IList_createListOfMyType(Type myType)
{
__ __return new List<myType>();
}

A:

Something_like this should_work.
public IList createList(Type myType)
{
_  _Type_genericListType = typeof(List<>).MakeGenericType(myType);
    return (IList)Activator.CreateInstance(genericListType);
}

A:

You could use Reflections, here is a_sample:
_ __Type_mytype = typeof (int);

 _  Type listGenericType =_typeof (List<>);

_   Type list = listGenericType.MakeGenericType(mytype);

 __ ConstructorInfo ci_= list.GetConstructor(new Type[] {});

    List<int> listInt_= (List<int>)ci.Invoke(new object[] {});

 Q:

If-Then-Else for_my simple HTML_form

I've_set_up a server, which_sends the following form to a_client and tries to receive the_submitted information. How can I add a_If-Else to it as simple as_possible? I need to say_if the_"use tracefile" is enabled, then_show the dropdown_box, otherwise,_show the customized_inputs so that user can enter_his/her numbers?
My second_concern is that the form does_not_seem very beautiful._How_can_I make_it aligned, all_input_boxes be_aligned,_and such?
    <html>
<body>
__  <p>
    <h3>Please_select a configuration below_to_run the emulator with:</h3>
_   <form action="run.html"_method="GET">
     _ _<input type="checkbox"_name="-w" value="-w">[-w]: wrap around at tracefile end and begin anew at_time zero. </input>
<br>
<input type="checkbox" name="-z" value="-w">[-z]:_zero packets routed through;_route to_co-resident_webserver  
</input>
<br>
<br>_YSE_Emulator to_Run: <select name="yse">
    _ _     <option_value="yse1">YSE1</option>
   __     _ <option value="yse2">YSE2</option>
   _    ___ <option value="yse3">YSE3</option>
  _     _  _<option value="