IsolatedStorageFileStream.CanWrite Property

Definition

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

public:
 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.

Examples

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)

Remarks

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

Applies to