You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add try.net to a few more examples in batch 1 (#3937)
* Add try.net to 1 more example in DateTime.ToString
* add try.net
* fix snippet id
* add try.net
* add try.net/remove dupe example
* add try.net
* remove interactive - inner snippet tags
* roll back changes
* add one more
* add one more
Copy file name to clipboardExpand all lines: xml/System.Collections.Generic/List`1.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1514,9 +1514,9 @@
1514
1514
1515
1515
## Examples
1516
1516
The following example demonstrates the <xref:System.Collections.Generic.List%601.Find%2A> method on a <xref:System.Collections.Generic.List%601> that contains a simple complex object.
The following example demonstrates the find methods for the <xref:System.Collections.Generic.List%601> class. The example for the <xref:System.Collections.Generic.List%601> class contains `book` objects, of class `Book`, using the data from the [Sample XML File: Books (LINQ to XML)](https://msdn.microsoft.com/library/94252daf-6097-4625-afc2-0eb778958d4f). The `FillList` method in the example uses [LINQ to XML](https://msdn.microsoft.com/library/f0fe21e9-ee43-4a55-b91a-0800e5782c13) to parse the values from the XML to property values of the `book` objects.
Copy file name to clipboardExpand all lines: xml/System/DateTime.xml
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7748,9 +7748,11 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
7748
7748
<exception cref="T:System.ArgumentOutOfRangeException">The date and time is outside the range of dates supported by the calendar used by the current culture.</exception>
7749
7749
<block subset="none" type="usage">
7750
7750
<para>The <see cref="M:System.DateTime.ToString" /> method returns the string representation of the date and time in the calendar used by the current culture. If the value of the current <see cref="T:System.DateTime" /> instance is earlier than <see cref="P:System.Globalization.Calendar.MinSupportedDateTime" /> or later than <see cref="P:System.Globalization.Calendar.MaxSupportedDateTime" />, the method throws an <see cref="T:System.ArgumentOutOfRangeException" />. The following example provides an illustration. It attempts to format a date that is outside the range of the <see cref="T:System.Globalization.HijriCalendar" /> class when the current culture is Arabic (Syria).
@@ -7933,8 +7935,10 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
7933
7935
<block subset="none" type="usage">
7934
7936
<para>The <see cref="M:System.DateTime.ToString(System.String)" /> method returns the string representation of the date and time in the calendar used by the current culture. If the value of the current <see cref="T:System.DateTime" /> instance is earlier than <see cref="P:System.Globalization.Calendar.MinSupportedDateTime" /> or later than <see cref="P:System.Globalization.Calendar.MaxSupportedDateTime" />, the method throws an <see cref="T:System.ArgumentOutOfRangeException" />. The following example provides an illustration. It attempts to format a date that is outside the range of the <see cref="T:System.Globalization.HebrewCalendar" /> class when the current culture is Hebrew (Israel).
Copy file name to clipboardExpand all lines: xml/System/Enum.xml
+16-19Lines changed: 16 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1170,8 +1170,8 @@ thisInstance And flag = flag
1170
1170
1171
1171
If `value` is a name that does not correspond to a named constant of `enumType`, the method throws an <xref:System.ArgumentException>. If `value` is the string representation of an integer that does not represent an underlying value of the `enumType` enumeration, the method returns an enumeration member whose underlying value is `value` converted to an integral type. If this behavior is undesirable, call the <xref:System.Enum.IsDefined%2A> method to ensure that a particular string representation of an integer is actually a member of `enumType`. The following example defines a `Colors` enumeration, calls the <xref:System.Enum.Parse%28System.Type%2CSystem.String%29> method to convert strings to their corresponding enumeration values, and calls the <xref:System.Enum.IsDefined%2A> method to ensure that particular integral values are underlying values in the `Colors` enumeration.
@@ -1180,9 +1180,9 @@ thisInstance And flag = flag
1180
1180
## Examples
1181
1181
The following example uses the <xref:System.Enum.Parse%28System.Type%2CSystem.String%29> method to parse an array of strings that are created by calling the <xref:System.Enum.GetNames%2A> method. It also uses the <xref:System.Enum.Parse%28System.Type%2CSystem.String%29> method to parse an enumeration value that consists of a bit field.
@@ -1261,18 +1261,15 @@ thisInstance And flag = flag
1261
1261
1262
1262
If `value` is a name that does not correspond to a named constant of `enumType`, the method throws an <xref:System.ArgumentException>. If `value` is the string representation of an integer that does not represent an underlying value of the `enumType` enumeration, the method returns an enumeration member whose underlying value is `value` converted to an integral type. If this behavior is undesirable, call the <xref:System.Enum.IsDefined%2A> method to ensure that a particular string representation of an integer is actually a member of `enumType`. The following example defines a `Colors` enumeration, calls the <xref:System.Enum.Parse%28System.Type%2CSystem.String%2CSystem.Boolean%29> method to convert strings to their corresponding enumeration values, and calls the <xref:System.Enum.IsDefined%2A> method to ensure that particular integral values are underlying values in the `Colors` enumeration.
The `ignoreCase` parameter specifies whether this operation is case-sensitive.
1268
1265
1269
1266
1270
1267
1271
1268
## Examples
1272
1269
The following example uses the <xref:System.Enum.Parse%28System.Type%2CSystem.String%2CSystem.Boolean%29> method to parse an array of strings that are created by calling the <xref:System.Enum.GetNames%2A> method. It also uses the <xref:System.Enum.Parse%28System.Type%2CSystem.String%29> method to parse an enumeration value that consists of a bit field.
0 commit comments