A method with an optional parameter.

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

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

Parameters

x
Type: int

.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