DateTime.ParseExact(monthName, "MMMM", CultureInfo.CurrentCulture ).Month
Although, for your purposes, you’ll probably be better off just creating a Dictionary<string, int>
mapping the month’s name to its value.
More Related Contents:
- Parse v. TryParse
- reading two integers in one line using C#
- What is the best way to parse html in C#? [closed]
- Parse string to DateTime in C#
- Parse JSON in C#
- How do I parse a string with a decimal point to a double?
- What is the difference between an int and an Integer in Java and C#?
- Which parsers are available for parsing C# code? [closed]
- Easiest way to compare arrays in C#
- Is there a CSS parser for C#? [closed]
- How do I format a DateTime in a different format?
- How would you compare two XML Documents?
- Evaluate string with math operators [duplicate]
- Parsing JSON Object with variable properties into strongly typed object
- How can I cast int to enum in C#?
- How to elegantly check if a number is within a range?
- Parsing CSV using OleDb using C#
- Test if string is a guid without throwing exceptions?
- How do I convert an ISO8601 TimeSpan to a C# TimeSpan?
- How can I convert BitArray to single int?
- Incremental JSON Parsing in C#
- Best way to handle Integer overflow in C#?
- Parse a string containing date and time in a custom format
- Is there any generic Parse() function that will convert a string to any type using parse?
- Is C#’s lambda expression grammar LALR(1)?
- Extracting Path from OpenFileDialog path/filename
- Why is a cast required for byte subtraction in C#? [duplicate]
- What is the best way to parse large XML (size of 1GB) in C#?
- .NET: Why is TryParseExact failing on Hmm and Hmmss?
- How to parse a boolean expression and load it into a class?