Trouble when using System.io.File in Unity

I hit the following problem when I try to buid a windowsPhone 8 and webPlayer game from Unity: “error CS0117: System.IO.File’ does not contain a definition forWriteAllLines’ " but the System.io.File work fine when I buid the game for android platform I have asked this question on StackOverFlow and I’ve got this answer:”
This is not available to Web Player for security reasons (Unity don’t want people making websites that can access the file system) and it’s not available to Windows Store Apps and Windows Phone 8 simply because this API doesn’t exist in these platforms. It was replaced by the Windows.Storage API, and that’s what you have to use for these platforms (WSA WP8).
But… it’s not so simple: Windows.Storage is not available for Android, etc, so you have to use compilation directives like #if UNITY_WP8. You have UNITY_WINRT, UNITY_WP8 and UNITY_METRO.
"

So can anyone tell me how to Store data into a file when buid a game from Unity for WindowsPhone 8?

Windows Phone does have File class, it just does not have WriteAllLines() method. You can still open the file and write to a stream.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.io.file(v=vs.105).aspx

As far as i know http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.io.file(v=vs.105).aspx is not avaible api for windows phone. You should use Unity - Scripting API: File instead. Easy way to do it is

Not really. File class is not available in Windows Store Apps. Windows Phone 8 does have it, just with some methods missing.
That link I posted was to .NET for Windows Phone.