Click or drag to resize
ManipulateSetYear Method
Set the Year of this dateTime to year, leaving all other all other parts the same.

Namespace: MomentSharp
Assembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static DateTime SetYear(
	this DateTime dateTime,
	int year
)

Parameters

dateTime
Type: SystemDateTime
this DateTime
year
Type: SystemInt32
new year

Return Value

Type: DateTime
DateTime

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also