[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Creating a file in isolated storage

Posted on 2009-07-08
4
Medium Priority
?
182 Views
Last Modified: 2013-12-17
The following example from .NET Framework 2.on page135 gives 3 errors.
What have I done wrongZ?
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.IO.IsolatedStorage;
 
class Program
{
  static void Main(string[] args)
  {
    // Create a Store for the current user
    IsolatedStorageFile userStore = IsolatedStorageFile.GetUserStoreForAssembly();
 
    IsolatedStorageFileStream userStream = new IsolatedStorageFileStream("UserSettings.set", FileMode.Create, userStore);
    StreamWriter userWriter = new StreamWriter(userStream);
    userWriter.WriteLine("User Prefs");
    userWriter.Close();
 
    Console.Read();
  }
 
}

Open in new window

0
Comment
Question by:AstroGuy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:mysteriousguy
ID: 24804334
Which errors do you get? Did you create a console application to implement the example?
I ran this code in Visual Studio 2008 with framework 2.0 without any errors.
0
 

Author Comment

by:AstroGuy
ID: 24805080
Yes I used a console application.  I received the following compile errors as the attached screenshot shows.
x-LabErrors-p154.JPG
0
 
LVL 4

Accepted Solution

by:
mysteriousguy earned 2000 total points
ID: 24805406
You made a mistake in spelling of IsolatedStorageFileStream.
0
 

Author Closing Comment

by:AstroGuy
ID: 31601118
Very good eye mysteriousguy.  Thanks. BTW this code was originally cut and pasted from the text.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question