今天装了个Visual C# 2005 Express Edition Beta1,用用发觉还挺方便的,里面加了Refactor功能和其他一些似曾相识的功能,不知是不是从Eclispe那里学回来的,手痒痒的在一个系统类名String上点了一下Go to definition,嘿,跳到一个源文件,显示这个类的定义源码,我眼睛睁得大大的,莫非微软给他的源码我看了?看看他是什么文件,System.String.cs(from metadata)!帅呆了!赶紧瞧瞧代码,一看,傻眼了,那些+号打开是注释!没有代码,只是定义。。。。。
namespace
System
{
/**//// <summary>Represents text as a series of Unicode characters.</summary>
/// <filterpriority>1</filterpriority>
[System.Reflection.DefaultMemberAttribute("Chars")]
public sealed class String : System.IComparable, System.ICloneable, System.IConvertible, System.Collections.IEnumerable, System.IComparable<System.String>
{
/**//// <summary>Returns a reference to this instance of <see cref="T:System.String" />.</summary>
/// <returns>This instance of String.</returns>
/// <filterpriority>2</filterpriority>
public object Clone();
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects.</summary>
/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.Value Meaning Less than zero The substring in strA is minus than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="comparisonType">One of the <see cref="T:System.StringComparison" /> values. </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length, System.StringComparison comparisonType);
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects, ignoring or honoring their case, and using culture-specific information to influence the comparison.</summary>
/// <returns>An integer indicating the lexical relationship between the two comparands.Value Type Condition Less than zero The substring in strA is less than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> object that supplies culture-specific comparison information. </param>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="ignoreCase">A <see cref="T:System.Boolean" /> indicating a case-sensitive or insensitive comparison. (true indicates a case-insensitive comparison.) </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within the strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase, System.Globalization.CultureInfo culture);
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects, ignoring or honoring their case.</summary>
/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.Value Type Condition Less than zero The substring in strA is less than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="ignoreCase">A <see cref="T:System.Boolean" /> indicating a case-sensitive or insensitive comparison. (true indicates a case-insensitive comparison.) </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase);
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects.</summary>
/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.Value Meaning Less than zero The substring in strA is minus than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length);
{
/**//// <summary>Represents text as a series of Unicode characters.</summary>
/// <filterpriority>1</filterpriority>
[System.Reflection.DefaultMemberAttribute("Chars")]
public sealed class String : System.IComparable, System.ICloneable, System.IConvertible, System.Collections.IEnumerable, System.IComparable<System.String>
{
/**//// <summary>Returns a reference to this instance of <see cref="T:System.String" />.</summary>
/// <returns>This instance of String.</returns>
/// <filterpriority>2</filterpriority>
public object Clone();
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects.</summary>
/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.Value Meaning Less than zero The substring in strA is minus than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="comparisonType">One of the <see cref="T:System.StringComparison" /> values. </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length, System.StringComparison comparisonType);
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects, ignoring or honoring their case, and using culture-specific information to influence the comparison.</summary>
/// <returns>An integer indicating the lexical relationship between the two comparands.Value Type Condition Less than zero The substring in strA is less than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> object that supplies culture-specific comparison information. </param>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="ignoreCase">A <see cref="T:System.Boolean" /> indicating a case-sensitive or insensitive comparison. (true indicates a case-insensitive comparison.) </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within the strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase, System.Globalization.CultureInfo culture);
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects, ignoring or honoring their case.</summary>
/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.Value Type Condition Less than zero The substring in strA is less than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="ignoreCase">A <see cref="T:System.Boolean" /> indicating a case-sensitive or insensitive comparison. (true indicates a case-insensitive comparison.) </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length, bool ignoreCase);
/**//// <summary>Compares substrings of two specified <see cref="T:System.String" /> objects.</summary>
/// <returns>A 32-bit signed integer indicating the lexical relationship between the two comparands.Value Meaning Less than zero The substring in strA is minus than the substring in strB. Zero The substrings are equal, or length is zero. Greater than zero The substring in strA is greater than the substring in strB. </returns>
/// <param name="strB">The second <see cref="T:System.String" />. </param>
/// <param name="strA">The first <see cref="T:System.String" />. </param>
/// <param name="length">The maximum number of characters in the substrings to compare. </param>
/// <param name="indexA">The position of the substring within strA. </param>
/// <param name="indexB">The position of the substring within strB. </param>
/// <filterpriority>1</filterpriority>
public static int Compare(string strA, int indexA, string strB, int indexB, int length);
还以为他要赶上java了。。。