# Programming for Windows Phone 7 (C#)



## spy2520 (Mar 24, 2010)

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)

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


----------



## DirectorC (Mar 25, 2010)

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


----------



## spy2520 (Mar 25, 2010)

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)

Windows Phone is the new Windows Mobile right?


----------



## spy2520 (Mar 25, 2010)

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


----------



## spy2520 (Mar 25, 2010)

everything is in xaml and c#.


----------



## spy2520 (Mar 26, 2010)

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)

i figured out my first problem. But i need help with my foreach loop now. Currently i'm using 
	
	



```
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)

Look here


----------



## spy2520 (Mar 26, 2010)

great stuff man.


----------



## Deleted member 3 (Mar 26, 2010)

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)

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





DanTheBanjoman said:


> 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.


----------

