The integer representing the era, if eraName is valid; otherwise, -1.
Type Reason ArgumentNullException eraName is a null reference.
The era name is the name a calendar uses to refer to a period of time reckoned from a fixed point or event. For example, "A.D." or "C.E." is the current era in the Gregorian calendar.
The comparison with eraName is case-insensitive, for example, "A.D." is equivalent to "a.d.".
DateTimeFormatInfo.GetEra(string) ignores punctuation in abbreviated era names, only if the System.Globalization.GregorianCalendar is selected in DateTimeFormatInfo.Calendar and the culture uses "A.D." as the era name, that is, "A.D." is equivalent to "AD".
DateTimeFormatInfo.GetEra(string) compares eraName with the full era name returned by DateTimeFormatInfo.GetEraName(int) and with the abbreviated era name returned by DateTimeFormatInfo.GetAbbreviatedEraName(int).