DataFormats.Format(String, Int32) Constructor

Definition

Initializes a new instance of the DataFormats.Format class with a Boolean that indicates whether a Win32 handle is expected.

C#
public Format(string name, int id);

Parameters

name
String

The name of this format.

id
Int32

The ID number for this format.

Examples

The following code example creates a new format for a name and unique ID number. The new format does not require a Windows handle. It requires that textBox1 has been instantiated.

C#
private void CreateMyFormat2() {
    DataFormats.Format myFormat = new DataFormats.Format("AnotherNewFormat", 20916);
 
    // Displays the contents of myFormat.
    textBox1.Text = "ID value: " + myFormat.Id + '\n' +
       "Format name: " + myFormat.Name;
 }

Applies to

Produkt Verzie
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10