{
public partial class String
{
- //
- // These fields map directly onto the fields in an EE StringObject. See object.h for the layout.
- //
- [NonSerialized]
- private int _stringLength;
-
- // For empty strings, this will be '\0' since
- // strings are both null-terminated and length prefixed
- [NonSerialized]
- private char _firstChar;
-
// The Empty constant holds the empty string value. It is initialized by the EE during startup.
// It is treated as intrinsic by the JIT as so the static constructor would never run.
// Leaving it uninitialized would confuse debuggers.
ThrowHelper.ThrowRankException(ExceptionResource.Rank_MultiDimNotSupported);
comparer ??= Comparer.Default;
-#if CORECLR
+#if !CORERT
if (comparer == Comparer.Default)
{
int retval;
if (count < 0 || count > array.Length - startIndex + lb)
ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
-#if CORECLR
+#if !CORERT
// Try calling a quick native method to handle primitive types.
int retVal;
bool r = TrySZIndexOf(array, startIndex, count, value, out retVal);
}
}
-#if CORECLR
+#if !CORERT
return EqualityComparer<T>.Default.IndexOf(array, value, startIndex, count);
#else
return IndexOfImpl(array, value, startIndex, count);
if (array.Rank != 1)
ThrowHelper.ThrowRankException(ExceptionResource.Rank_MultiDimNotSupported);
-#if CORECLR
+#if !CORERT
// Try calling a quick native method to handle primitive types.
int retVal;
bool r = TrySZLastIndexOf(array, startIndex, count, value, out retVal);
}
}
-#if CORECLR
+#if !CORERT
return EqualityComparer<T>.Default.LastIndexOf(array, value, startIndex, count);
#else
return LastIndexOfImpl(array, value, startIndex, count);
if (length <= 1)
return;
-#if CORECLR
+#if !CORERT
bool r = TrySZReverse(array, index, length);
if (r)
return;
if (length > 1)
{
-#if CORECLR
+#if !CORERT
if (comparer == null || comparer == Comparer<T>.Default)
{
if (TrySZSort(array, null, index, index + length - 1))
if (length > 1)
{
-#if CORECLR
+#if !CORERT
if (comparer == null || comparer == Comparer<TKey>.Default)
{
if (TrySZSort(keys, items, index, index + length - 1))