Export (0) Print
Expand All

FileSystemInfo.GetObjectData Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Sets the SerializationInfo object with the file name and additional exception information.

[Visual Basic]
<ComVisible(False)>
Public Overridable Sub GetObjectData( _
   ByVal info As SerializationInfo, _
   ByVal context As StreamingContext _
) Implements ISerializable.GetObjectData
[C#]
[ComVisible(false)]
public virtual void GetObjectData(
 SerializationInfo info,
 StreamingContext context
);
[C++]
[ComVisible(false)]
public: virtual void GetObjectData(
 SerializationInfo* info,
 StreamingContext context
);
[JScript]
public
   ComVisible(false)
function GetObjectData(
 info : SerializationInfo,
 context : StreamingContext
);

Parameters

info
The SerializationInfo that holds the serialized object data about the exception being thrown.
context
The StreamingContext that contains contextual information about the source or destination.

Implements

ISerializable.GetObjectData

Remarks

The following table lists examples of other typical or related I/O tasks.

To do this... See the example in this topic...
Write to a text file. Writing Text to a File
Read from a text file. Reading Text from a File
Append text to a file. Opening and Appending to a Log File

File.AppendText

FileInfo.AppendText

Rename or move a file. File.Move

FileInfo.MoveTo

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileSystemInfo Class | FileSystemInfo Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File

Show:
© 2014 Microsoft