Size.Subtraction(Size, Size) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
static System::Drawing::Size operator -(System::Drawing::Size sz1, System::Drawing::Size sz2);
public static System.Drawing.Size operator - (System.Drawing.Size sz1, System.Drawing.Size sz2);
static member ( - ) : System.Drawing.Size * System.Drawing.Size -> System.Drawing.Size
Public Shared Operator - (sz1 As Size, sz2 As Size) As Size
Parameters
Returns
A Size structure that is the result of the subtraction operation.
Examples
The following code example demonstrates the Subtraction operator. The example is designed to be used with Windows Forms. To run the example, paste it into a form that contains a button named subtractionButton
and associate the subtractButton_Click
method with the button's Click event.
void subtractButton_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
subtractButton->Size = subtractButton->Size - System::Drawing::Size( 10, 10 );
}
private void subtractButton_Click(System.Object sender, System.EventArgs e)
{
subtractButton.Size = subtractButton.Size - new Size(10, 10);
}
Private Sub subtractButton_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles subtractButton.Click
subtractButton.Size = Size.op_Subtraction(subtractButton.Size, _
New Size(10, 10))
End Sub
Applies to
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.