[CLSCompliant(false)]
public TypedReference GetNextArg()
{
- TypedReference result = new TypedReference ();
+ TypedReference result = new TypedReference();
// reference to TypedReference is banned, so have to pass result as pointer
unsafe
{
- FCallGetNextArg (&result);
+ FCallGetNextArg(&result);
}
return result;
}
if (ArgPtr == IntPtr.Zero)
throw new ArgumentNullException();
- TypedReference result = new TypedReference ();
+ TypedReference result = new TypedReference();
// reference to TypedReference is banned, so have to pass result as pointer
unsafe
{
return unchecked((int)((long)this._methodPtrAux));
*/
if (_methodPtrAux == IntPtr.Zero)
- return ( _target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode();
+ return (_target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode();
else
return GetType().GetHashCode();
}
lock (s_notifications)
{
- s_notifications.Add (new MemoryLoadChangeNotification(lowMemoryPercent, highMemoryPercent, notification));
+ s_notifications.Add(new MemoryLoadChangeNotification(lowMemoryPercent, highMemoryPercent, notification));
if (s_notifications.Count == 1)
{
{
return new MethodToken(GetMemberRefToken(method, null));
}
- else if ( method is SymbolMethod symMethod)
+ else if (method is SymbolMethod symMethod)
{
if (symMethod.GetModule() == this)
return symMethod.GetToken();
{
if (isString)
{
- newArray[currElem] = wrapperCons.Invoke(new object?[] {(string?)oldArray.GetValue(currElem)});
+ newArray[currElem] = wrapperCons.Invoke(new object?[] { (string?)oldArray.GetValue(currElem)});
}
else
{
ticks += TimeToTicks(time.systemTime.Hour, time.systemTime.Minute, time.systemTime.Second);
ticks += time.systemTime.Milliseconds * TicksPerMillisecond;
ticks += time.hundredNanoSecond;
- return new DateTime( ((ulong)(ticks)) | KindUtc);
+ return new DateTime(((ulong)(ticks)) | KindUtc);
}
// FullSystemTime struct is the SYSTEMTIME struct with extra hundredNanoSecond field to store more precise time.
/// use the debugger's line mapping logic.
/// </summary>
public StackFrame(string? fileName, int lineNumber, int colNumber)
- : this (fileName, lineNumber)
+ : this(fileName, lineNumber)
{
_columnNumber = colNumber;
}
if (GlobalizationMode.Invariant)
{
m_SortVersion = new SortVersion(0, CultureInfo.LOCALE_INVARIANT, new Guid(0, 0, 0, 0, 0, 0, 0,
- (byte) (CultureInfo.LOCALE_INVARIANT >> 24),
- (byte) ((CultureInfo.LOCALE_INVARIANT & 0x00FF0000) >> 16),
- (byte) ((CultureInfo.LOCALE_INVARIANT & 0x0000FF00) >> 8),
- (byte) (CultureInfo.LOCALE_INVARIANT & 0xFF)));
+ (byte)(CultureInfo.LOCALE_INVARIANT >> 24),
+ (byte)((CultureInfo.LOCALE_INVARIANT & 0x00FF0000) >> 16),
+ (byte)((CultureInfo.LOCALE_INVARIANT & 0x0000FF00) >> 8),
+ (byte)(CultureInfo.LOCALE_INVARIANT & 0xFF)));
}
else
{
if (name[i] >= 'A' && name[i] <= 'Z')
{
// lowercase characters before '-'
- normalizedName[i] = (char) (((int)name[i]) + 0x20);
+ normalizedName[i] = (char)(((int)name[i]) + 0x20);
changed = true;
}
else
{
if (name[i] >= 'a' && name[i] <= 'z')
{
- normalizedName[i] = (char) (((int)name[i]) - 0x20);
+ normalizedName[i] = (char)(((int)name[i]) - 0x20);
changed = true;
}
else
}
}
- internal bool HasSpacesInMonthNames =>(FormatFlags & DateTimeFormatFlags.UseSpacesInMonthNames) != 0;
+ internal bool HasSpacesInMonthNames => (FormatFlags & DateTimeFormatFlags.UseSpacesInMonthNames) != 0;
internal bool HasSpacesInDayNames => (FormatFlags & DateTimeFormatFlags.UseSpacesInDayNames) != 0;
// Gregorian year 2001 is Korean year 4334.
private static readonly EraInfo[] s_koreanEraInfo = new EraInfo[]
{
- new EraInfo( 1, 1, 1, 1, -2333, 2334, GregorianCalendar.MaxYear + 2333) // era #, start year/month/day, yearOffset, minEraYear
+ new EraInfo(1, 1, 1, 1, -2333, 2334, GregorianCalendar.MaxYear + 2333) // era #, start year/month/day, yearOffset, minEraYear
};
private readonly GregorianCalendarHelper _helper;
// So yearOffset = 1911
private static readonly EraInfo[] s_taiwanEraInfo = new EraInfo[]
{
- new EraInfo( 1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911) // era #, start year/month/day, yearOffset, minEraYear
+ new EraInfo(1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911) // era #, start year/month/day, yearOffset, minEraYear
};
private static volatile Calendar? s_defaultInstance;
// So yearOffset = 1911
private static readonly EraInfo[] s_taiwanLunisolarEraInfo = new EraInfo[]
{
- new EraInfo( 1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911) // era #, start year/month/day, yearOffset, minEraYear
+ new EraInfo(1, 1912, 1, 1, 1911, 1, GregorianCalendar.MaxYear - 1911) // era #, start year/month/day, yearOffset, minEraYear
};
private readonly GregorianCalendarHelper _helper;
{
private static readonly EraInfo[] s_thaiBuddhistEraInfo = new EraInfo[]
{
- new EraInfo( 1, 1, 1, 1, -543, 544, GregorianCalendar.MaxYear + 543) // era #, start year/month/day, yearOffset, minEraYear
+ new EraInfo(1, 1, 1, 1, -543, 544, GregorianCalendar.MaxYear + 543) // era #, start year/month/day, yearOffset, minEraYear
};
public const int ThaiBuddhistEra = 1;
/// <summary>Indicates whether the current Index object is equal to another Index object.</summary>
/// <param name="other">An object to compare with this object</param>
- public bool Equals (Index other) => _value == other._value;
+ public bool Equals(Index other) => _value == other._value;
/// <summary>Returns the hash code for this instance.</summary>
public override int GetHashCode() => _value;
[CLSCompliant(false)]
[Intrinsic]
[NonVersionable]
- public static unsafe explicit operator void* (IntPtr value)
+ public static unsafe explicit operator void*(IntPtr value)
{
return value._value;
}
{
char replacementChar = replacementFallback.DefaultString[0];
- int numElementsToConvert = Math.Min( bytes.Length, chars.Length);
+ int numElementsToConvert = Math.Min(bytes.Length, chars.Length);
int idx = 0;
fixed (byte* pBytes = &MemoryMarshal.GetReference(bytes))
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
- if ( bytes.Length - byteIndex < byteCount)
+ if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
if (charIndex < 0 || charIndex > chars.Length)
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
- if ( bytes.Length - byteIndex < byteCount)
+ if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
if (charIndex < 0 || charIndex > chars.Length)
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
- if ( bytes.Length - byteIndex < byteCount)
+ if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
if (charIndex < 0 || charIndex > chars.Length)
if (byteIndex < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException((byteIndex < 0 ? nameof(byteIndex) : nameof(byteCount)), SR.ArgumentOutOfRange_NeedNonNegNum);
- if ( bytes.Length - byteIndex < byteCount)
+ if (bytes.Length - byteIndex < byteCount)
throw new ArgumentOutOfRangeException(nameof(bytes), SR.ArgumentOutOfRange_IndexCountBuffer);
if (charIndex < 0 || charIndex > chars.Length)
// No fallback, maybe we can do it fast
#if FASTLOOP
// If endianess is backwards then each pair of bytes would be backwards.
- if ( (bigEndian ^ BitConverter.IsLittleEndian) &&
+ if ((bigEndian ^ BitConverter.IsLittleEndian) &&
#if BIT64
(unchecked((long)chars) & 7) == 0 &&
#else
// No fallback, maybe we can do it fast
#if FASTLOOP
// If endianess is backwards then each pair of bytes would be backwards.
- if ( (bigEndian ^ BitConverter.IsLittleEndian) &&
+ if ((bigEndian ^ BitConverter.IsLittleEndian) &&
#if BIT64
(unchecked((long)chars) & 7) == 0 &&
#else
[Intrinsic]
[NonVersionable]
- public static unsafe explicit operator void* (UIntPtr value)
+ public static unsafe explicit operator void*(UIntPtr value)
{
return value._value;
}