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