Get Week Number of Month in C#

C# doesn’t have a built in function to get week number of month for its DateTime class. You could simply use the following function to get the week number by passing date as a parameter in the GetWeekNumberOfMonth function.