Hello Kunal (you just need to put your code in [CODE] tags),
I've just tryed the snippet, and yes I get the same result as you, first you need to know that Quota returns the maximum
after a small search I found this : "Windows Phone apps are not restricted to a particular quota. They should make careful use of storage based on their app scenario requirements."
that's why we get 9223372036854775807 as a Quota.
that snippet would work fine on a Silverlight app, but in the WP case there is no need, so basically since the Quota is not restricted all you'll have to do is to see if there is available space on the phone.
Code:
public void CheckDiskSpace(long neededSpace)
{
using (IsolatedStorageFile myISFile = IsolatedStorageFile.GetUserStoreForApplication())
{
if (myISFile.AvailableFreeSpace < neededSpace) // if true, means there is no space available in the phone.
{
throw new Exception("No space available on the phone, please delete a file");
}
}
}