DataFormats.Dif フィールド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)


DIF は ASCII コードで記述され、データベースやスプレッドシートのようなドキュメントを複数のプログラムで使用したり交換したりできるように構成されているフォーマットです。
このフィールドは、データ型を指定するために、IDataObject インターフェイスと DataObject クラスで使用されます。
IDataObject または DataObject の実装に追加する場合は、IDataObject.SetData メソッドと DataObject.SetData メソッドの形式として、このフィールドを使用します。
この型のオブジェクトが存在するかどうかを確認するには、IDataObject.GetDataPresent メソッドと DataObject.GetDataPresent メソッドの形式として、このフィールドを使用します。
この型のオブジェクトを取得するには、IDataObject.GetData メソッドと DataObject.GetData メソッドの形式として、このフィールドを使用します。

Dim myFileStream As FileStream = File.Open("Temp.dif", FileMode.Open) ' Store the data into Dif format. Dim myDataObject As New DataObject() myDataObject.SetData(DataFormats.Dif, myFileStream) ' Check whether the data is stored or not in the specified format. Dim formatPresent As Boolean = myDataObject.GetDataPresent(DataFormats.Dif) If formatPresent Then Console.WriteLine(("The data has been stored in the Dif format is:'" + formatPresent.ToString() + "'")) Else Console.WriteLine("The data has not been stored in the specified format") End If
FileStream myFileStream = File.Open("Temp.dif",FileMode.Open); // Store the data into Dif format. DataObject myDataObject = new DataObject(); myDataObject.SetData(DataFormats.Dif,myFileStream); // Check whether the data is stored or not in the specified format. bool formatPresent = myDataObject.GetDataPresent(DataFormats.Dif); if(formatPresent) { Console.WriteLine("The data has been stored in the Dif format is:'"+formatPresent+"'"); } else { Console.WriteLine("The data has not been stored in the specified format"); }
FileStream^ myFileStream = File::Open( "Temp.dif", FileMode::Open ); // Store the data into Dif format. DataObject^ myDataObject = gcnew DataObject; myDataObject->SetData( DataFormats::Dif, myFileStream ); // Check whether the data is stored or not in the specified format. bool formatPresent = myDataObject->GetDataPresent( DataFormats::Dif ); if ( formatPresent ) { Console::WriteLine( "The data has been stored in the Dif format is:'{0}'", formatPresent ); } else { Console::WriteLine( "The data has not been stored in the specified format" ); }
FileStream myFileStream = File.Open("Temp.dif", FileMode.Open); // Store the data into Dif format. DataObject myDataObject = new DataObject(); myDataObject.SetData(DataFormats.Dif, myFileStream); // Check whether the data is stored or not in the specified format. boolean formatPresent = myDataObject.GetDataPresent(DataFormats.Dif); if (formatPresent) { Console.WriteLine( "The data has been stored in the Dif format is:'" + System.Convert.ToString(formatPresent) + "'"); } else { Console.WriteLine("The data has not been stored in the " + "specified format"); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


DataFormats クラス
DataFormats メンバ
System.Windows.Forms 名前空間
GetData
SetData
GetDataPresent
GetFormats
DataObject
IDataObject
GetFormat
DataFormats.Format.Name
DataFormats.Format.Id
- DataFormats.Dif フィールドのページへのリンク