techPowerUp! Forums

techPowerUp! Forums (http://www.techpowerup.com/forums/index.php)
-   Programming & Webmastering (http://www.techpowerup.com/forums/forumdisplay.php?f=52)
-   -   Programming for Windows Phone 7 (C#) (http://www.techpowerup.com/forums/showthread.php?t=118359)

spy2520 Mar 24, 2010 10:46 PM

Programming for Windows Phone 7 (C#)
 
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.

spy2520 Mar 25, 2010 02:18 PM

I know somebody knows, or does this only use a subset of C#?

DirectorC Mar 25, 2010 02:21 PM

You should probably do some research into the differences of programming for Windows and Windows Mobile.

spy2520 Mar 25, 2010 05:13 PM

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.

DirectorC Mar 25, 2010 05:36 PM

Windows Phone is the new Windows Mobile right?

spy2520 Mar 25, 2010 07:37 PM

well windows phone is just windows mobile. But windows phone 7 is being put out as an all new thing.

spy2520 Mar 25, 2010 07:37 PM

everything is in xaml and c#.

spy2520 Mar 26, 2010 01:59 PM

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.

spy2520 Mar 26, 2010 02:29 PM

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.

Kreij Mar 26, 2010 02:53 PM

Look here

spy2520 Mar 26, 2010 03:12 PM

great stuff man.

DanTheBanjoman Mar 26, 2010 03:15 PM

Windows phone 7 works via Silverlight? No native .NET applications anymore? I understood a lot wouldn't work, but this is really crap.

spy2520 Mar 26, 2010 05:20 PM

i'm starting to question why i used enumerators for suits and faces in a blackjack app in the first place.



Quote:

Originally Posted by DanTheBanjoman (Post 1824146)
Windows phone 7 works via Silverlight? No native .NET applications anymore? I understood a lot wouldn't work, but this is really crap.

thats what it looks like.


All times are GMT. The time now is 09:23 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.