Skip to content

Commit

Permalink
Make TimeZoneInfo fields readonly (dotnet/coreclr#8526)
Browse files Browse the repository at this point in the history
TimeZoneInfo is immutable. Help enforce this by making its fields
readonly.

Commit migrated from dotnet/coreclr@37c632e
  • Loading branch information
justinvp authored and tarekgh committed Dec 9, 2016
1 parent b917ac0 commit b887bb2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/coreclr/src/mscorlib/src/System/TimeZoneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ internal enum TimeZoneInfoOptions {
sealed public class TimeZoneInfo : IEquatable<TimeZoneInfo>, ISerializable, IDeserializationCallback
{
// ---- SECTION: members supporting exposed properties -------------*
private String m_id;
private String m_displayName;
private String m_standardDisplayName;
private String m_daylightDisplayName;
private TimeSpan m_baseUtcOffset;
private Boolean m_supportsDaylightSavingTime;
private AdjustmentRule[] m_adjustmentRules;
private readonly String m_id;
private readonly String m_displayName;
private readonly String m_standardDisplayName;
private readonly String m_daylightDisplayName;
private readonly TimeSpan m_baseUtcOffset;
private readonly Boolean m_supportsDaylightSavingTime;
private readonly AdjustmentRule[] m_adjustmentRules;

// ---- SECTION: members for internal support ---------*
private enum TimeZoneInfoResult {
Expand Down

0 comments on commit b887bb2

Please sign in to comment.