A method with an optional parameter.

Namespace: SampleClassLibrary
Assembly: SampleClassLibrary (in SampleClassLibrary.dll)

Protected Sub TestMethod( _ 
Optional ByVal x As Integer = 3 _ 
) Implements _ 
ISampleInterface.TestMethod
This language is not supported or no code example is available.
protected void TestMethod( 
int x = 3 
)
This language is not supported or no code example is available.
member protected TestMethod :  
?x:int 
-> unit
This language is not supported or no code example is available.
protected:  
void TestMethod( 
int x 
)
This language is not supported or no code example is available.
protected function TestMethod( 
x : int 
);
This language is not supported or no code example is available.

Parameters

x
Type: int

Implements

ISampleInterface.TestMethod

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Core

Supported in: 1.0, 1.1, 2.0

.NET Standard

Supported in: 2.0

Xamarin.Android

Supported in: 7.1

Portable Class Library

Supported in: Portable Class Library