IsolatedStorageFileStream.CanWrite Property


Gets a Boolean value indicating whether you can write to the file.

 virtual property bool CanWrite { bool get(); };
public override bool CanWrite { get; }
member this.CanWrite : bool
Public Overrides ReadOnly Property CanWrite As Boolean

Property Value

true if an IsolatedStorageFileStream object can be written; otherwise, false.


The following code example demonstrates how you could use the CanWrite property, as a check to see whether a stream can be read before calling the Write or BeginWrite methods. For the complete context of this example, see the IsolatedStorageFileStream overview.

Console::WriteLine( "Is the target file writable? {0}", (target->CanWrite ? (String^)"true" : "false") );

Console.WriteLine("Is the target file writable? " + (target.CanWrite ? "true" : "false"));
If target.CanWrite Then canWrite = True Else canWrite = False
Console.WriteLine("Is the target file writable? " & canWrite)


Use this property to determine whether the IsolatedStorageFileStream object can be written.

Applies to