Does IsolatedStorageFileStream.Lock work under SIlverlight4?
Posted
by Noah
on Stack Overflow
See other posts from Stack Overflow
or by Noah
Published on 2010-04-16T23:32:20Z
Indexed on
2010/04/16
23:43 UTC
Read the original article
Hit count: 620
Silverlight uses an IsolatedStorageFileStream to open files.
The IsolatedStorageFileStreamunder NET.4 claims to support the Lock Method (Inherited from FileStream)
The following code
IsolatedStorageFile isf;
IsolatedStorageFileStream lockStream = new IsolatedStorageFileStream( "my.lck", FileMode.OpenOrCreate, isf );
lockStream.Lock( 0, 0 );
generates the following error, wrapped for readability, under VS2010 and Silverlight 4
'System.IO.IsolatedStorage.IsolatedStorageFileStream' does not contain a definition for 'Lock'
and no extension method 'Lock' accepting a first argument of type 'System.IO.IsolatedStorage.IsolatedStorageFileStream' could be found
(are you missing a using directive or an assembly reference?)
© Stack Overflow or respective owner