Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: need C# advice

  1. #21

    Default

    Why not just use Generics? Not sure sa syntax kapoy open sa VS2005.

    System.Collections.Generic.Dictionary<Int,String> MyDictionary=new System.Collections.Generic.Dictionary<Int,String>( );
    MyDictionary.Add(1,"One");
    MyDictionary.Add(2,"Two");
    MyDictionary.Add(3,"Three");
    MyDictionary.Add(4,"Four");

    If the user inputs 1, you can just retrieve the string value like this:
    MyDictionary(1); //This should give you a string "One"

    Wala nay daghan switch or if then else.

  2. #22

    Default

    Yup a dictionary can replace the array in the solution ....

    But I don't think naabot na mo ug Generics sa inyo lesson Deathnote? o kutob pa lang mo arrays and strings karon?

    Btw ... asa man diay ka skwela and kinsa man imo teacher?

  3. #23

    Default

    nope never heard of generics....hehehe...actually 3year nako run....ACT ko skewla bai kanang duol sa emall....maam jenny ako teacher

  4. #24

    Default

    Read about Generics mga bro it is very nice. Generics og Serialization ra akong ganahan sa .NET

  5. #25

    Default

    ok will do sir Rainerius

  6. #26

    Default

    Quote Originally Posted by Rainerius View Post
    Why not just use Generics? Not sure sa syntax kapoy open sa VS2005.

    System.Collections.Generic.Dictionary<Int,String> MyDictionary=new System.Collections.Generic.Dictionary<Int,String>( );
    MyDictionary.Add(1,"One");
    MyDictionary.Add(2,"Two");
    MyDictionary.Add(3,"Three");
    MyDictionary.Add(4,"Four");

    If the user inputs 1, you can just retrieve the string value like this:
    MyDictionary(1); //This should give you a string "One"

    Wala nay daghan switch or if then else.
    kabug-at anang generics.. ngano mugamit man mo ana oi..

    in the words of Lord Master Tugak.. "Ayaw'g gamit sa STL dong!"

  7. #27

    Default

    Mas maau ghapon mogamit og loops and conditions kay ang purpose sa problem mapraktis ang logic..
    generics are efficient though and prevents casting which can cause too much overhead in processing...

  8. #28

    Default

    Quote Originally Posted by bluedes View Post
    kabug-at anang generics.. ngano mugamit man mo ana oi..

    in the words of Lord Master Tugak.. "Ayaw'g gamit sa STL dong!"
    Kinsa ingon bug-at ang Generics? .NET man kaha imong gusto Generics gamita. Ang mo ingon nga bug-at Generics kay mga old school C++ boys ra. 2009 na dodong, dili 1995.

  9. #29

    Default

    Quote Originally Posted by bluedes View Post
    kabug-at anang generics.. ngano mugamit man mo ana oi..

    in the words of Lord Master Tugak.. "Ayaw'g gamit sa STL dong!"
    Kinsa ingon bug-at ang Generics? .NET man kaha imong gusto Generics gamita. Ang mo ingon nga bug-at Generics kay mga old school C++ boys ra. 2009 na dodong, dili 1995.

Page 3 of 3 FirstFirst 123

Similar Threads

 
  1. Need your advice for a wireless router
    By jhnpl in forum Computer Hardware
    Replies: 20
    Last Post: 08-09-2012, 09:40 PM
  2. Why do we have to experience pain? NEED YOUR ADVICE
    By IamTheWind- in forum "Love is..."
    Replies: 88
    Last Post: 04-04-2012, 11:03 PM
  3. Hard Disk Probs..need an advice of what to do..
    By benz_jie2002 in forum Computer Hardware
    Replies: 17
    Last Post: 01-23-2007, 10:24 PM
  4. dvd r/w : unsa-on pag burn ug dvd's : need ur advice
    By rasta_dubbed in forum Computer Hardware
    Replies: 14
    Last Post: 12-09-2005, 06:31 PM
  5. need your advice on lcd monitors...
    By for_real in forum Computer Hardware
    Replies: 9
    Last Post: 09-12-2005, 02:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top