UtilDateTimeGetAge(DateTime) Method
Gets the current years old of a person from the specified birth date.
Namespace: DevCase.Core.DateAndTimeAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static int GetAge(
DateTime birthDate
)
Public Shared Function GetAge (
birthDate As DateTime
) As Integer
Dim birthDate As DateTime
Dim returnValue As Integer
returnValue = UtilDateTime.GetAge(birthDate)
public:
static int GetAge(
DateTime birthDate
)
static member GetAge :
birthDate : DateTime -> int
No code example is currently available or this language may not be supported.
- birthDate DateTime
-
The birth date.
Int32
The years old.
This is a code example.
No code example is currently available or this language may not be supported.
Dim birthdDate As Date = Date.ParseExact("08/09/1986", "dd/MM/yyyy", CultureInfo.InvariantCulture)
Dim age As Integer = GetAge(birthdDate)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
ArgumentOutOfRangeException
|
at
|