When I decompile String.IndexOf (String)
method, I see this;
[__DynamicallyInvokable]
public int IndexOf(string value)
{
return this.IndexOf(value, string.LegacyMode ? StringComparison.Ordinal : StringComparison.CurrentCulture);
}
In the second parameter definition:
string.LegacyMode
is true
, StringComparison.Ordinal
is evaluated.string.LegacyMode
is false
, StringComparison.CurrentCulture
is evaluated.But what does String.LegacyMode
exactly mean?
When I decompile this property I see this:
internal static bool LegacyMode
{
get
{
return CompatibilitySwitches.IsAppEarlierThanSilverlight4;
}
}
I searched about String.LegacyMode and CompatibilitySwitches.IsAppEarlierThanSilverlight4 on Google first but I couldn't find any useful information.
Can you enlighten me?
TinyDB is used to store persistent data directly on the Android device; this is useful for highly personalized apps where the user won't need to share her data with another device or person, as in No Texting While Driving.
TinyDB. TinyDB is a non-visible component that stores data for an app. Apps created with App Inventor are initialized each time they run. This means that if an app sets the value of a variable and the user then quits the app, the value of that variable will not be remembered the next time the app is run.
Why not check the source, MSDN :)
Ninja edit: I just saw the link you posted at the top of your question. Select Silverlight from the other versions dropdown and you'll see the note below.
String.IndexOf Method
Notes to Callers
Starting in Silverlight 4, the behavior of the String.IndexOf(String) method has changed. In Silverlight 4, it performs a case-sensitive and culture-sensitive comparison using the current culture to find the first occurrence of value. This conforms to the behavior of the String.IndexOf(String) method in the full .NET Framework. In Silverlight 2 and Silverlight 3, String.IndexOf(String) performs an ordinal comparison. If the common language runtime determines that a Silverlight-based application was compiled using either Silverlight 2 or Silverlight 3, it performs an ordinal comparison; otherwise, it performs a culture-sensitive comparison.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With