1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Programming for Windows Phone 7 (C#)

Discussion in 'Programming & Webmastering' started by spy2520, Mar 24, 2010.

  1. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    Ok i have identical code written in C#. But for some reason the same C# code in a Windows Phone 7 app doesnt compile. The only things causing problems are ArrayLists are said to not exist, and also System.Enum does not have a GetValues() method for some reason. This is for the blackjack app i made a thread about a while ago.
     
    10 Year Member at TPU
  2. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    I know somebody knows, or does this only use a subset of C#?
     
    10 Year Member at TPU
  3. DirectorC

    DirectorC New Member

    Joined:
    Nov 4, 2009
    Messages:
    1,624 (0.63/day)
    Thanks Received:
    268
    Location:
    Florizy
    You should probably do some research into the differences of programming for Windows and Windows Mobile.
     
  4. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    I probably should. I figured since windows phone 7 is a new architecture and it won't be released til the end of the year maybe some people were experimenting with it. I didn't think programming for windows mobile and windows phone were the same since they are pushing the fact that there is no backwards compatibilty.
     
    10 Year Member at TPU
  5. DirectorC

    DirectorC New Member

    Joined:
    Nov 4, 2009
    Messages:
    1,624 (0.63/day)
    Thanks Received:
    268
    Location:
    Florizy
    Windows Phone is the new Windows Mobile right?
     
  6. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    well windows phone is just windows mobile. But windows phone 7 is being put out as an all new thing.
     
    10 Year Member at TPU
  7. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    everything is in xaml and c#.
     
    10 Year Member at TPU
  8. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    well...looks like my dumbass doesnt know anything about silverlight. There are no arraylists. Shouldnt be hard to fix now that i have time to research.
     
    10 Year Member at TPU
  9. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    i figured out my first problem. But i need help with my foreach loop now. Currently i'm using
    Code:
    foreach (Faces F in Enum.GetValues(typeof(Faces)))
    But the GetValues method doesnt exist in Silverlight and i'm having a hard time finding an alternative.
     
    10 Year Member at TPU
  10. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    spy2520 says thanks.
  11. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    great stuff man.
     
    10 Year Member at TPU
  12. DanTheBanjoman SeƱor Moderator

    Joined:
    May 20, 2004
    Messages:
    10,546 (2.30/day)
    Thanks Received:
    1,384
    Windows phone 7 works via Silverlight? No native .NET applications anymore? I understood a lot wouldn't work, but this is really crap.
     
    10 Year Member at TPU
  13. spy2520 New Member

    Joined:
    Mar 8, 2006
    Messages:
    498 (0.13/day)
    Thanks Received:
    16
    i'm starting to question why i used enumerators for suits and faces in a blackjack app in the first place.



    thats what it looks like.
     
    10 Year Member at TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)