|
1733 | 1733 | ## Examples
|
1734 | 1734 | The following example creates several <xref:System.TimeSpan> objects and displays the <xref:System.TimeSpan.Hours%2A> property of each.
|
1735 | 1735 |
|
1736 |
| - [!code-cpp[System.TimeSpan.Properties#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CPP/properties.cpp#1)] |
1737 |
| - [!code-csharp[System.TimeSpan.Properties#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CS/properties.cs#1)] |
1738 |
| - [!code-vb[System.TimeSpan.Properties#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Properties/VB/properties.vb#1)] |
1739 |
| - |
| 1736 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CPP/properties.cpp" id="Snippet1"::: |
| 1737 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CS/properties.cs" interactive="try-dotnet" id="Snippet1"::: |
| 1738 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Properties/VB/properties.vb" id="Snippet1"::: |
| 1739 | +
|
1740 | 1740 | ]]></format>
|
1741 | 1741 | </remarks>
|
1742 | 1742 | <altmember cref="P:System.TimeSpan.TotalHours" />
|
@@ -3558,9 +3558,9 @@ When a time interval component in the string to be parsed contains more than sev
|
3558 | 3558 |
|
3559 | 3559 | In addition, the example changes the way in which the time interval parsing methods interpret a single digit. Ordinarily, a single digit is interpreted as the number of days in a time interval. Instead, the `%h` custom format string is used to interpret a single digit as the number of hours. For this change to be effective, note that the `%h` custom format string must precede the other format strings in the `formats` array. Also note from the output that the <xref:System.Globalization.TimeSpanStyles.AssumeNegative?displayProperty=nameWithType> flag specified in the method call is used only when parsing a string with this format specifier.
|
3560 | 3560 |
|
3561 |
| - [!code-csharp[System.TimeSpan.ParseExact#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parseexact/cs/parseexactexample4.cs#4)] |
3562 |
| - [!code-vb[System.TimeSpan.ParseExact#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parseexact/vb/parseexactexample4.vb#4)] |
3563 |
| - |
| 3561 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parseexact/cs/parseexactexample4.cs" interactive="try-dotnet" id="Snippet4"::: |
| 3562 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parseexact/vb/parseexactexample4.vb" id="Snippet4"::: |
| 3563 | +
|
3564 | 3564 | ]]></format>
|
3565 | 3565 | </remarks>
|
3566 | 3566 | <exception cref="T:System.ArgumentException">
|
@@ -3984,10 +3984,10 @@ This member is an explicit interface member implementation. It can be used only
|
3984 | 3984 | ## Examples
|
3985 | 3985 | The following example references and displays the value of the <xref:System.TimeSpan.TicksPerMillisecond> field.
|
3986 | 3986 |
|
3987 |
| - [!code-cpp[System.TimeSpan.Fields#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CPP/fields.cpp#1)] |
3988 |
| - [!code-csharp[System.TimeSpan.Fields#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CS/fields.cs#1)] |
3989 |
| - [!code-vb[System.TimeSpan.Fields#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Fields/VB/fields.vb#1)] |
3990 |
| - |
| 3987 | + :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CPP/fields.cpp" id="Snippet1"::: |
| 3988 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CS/fields.cs" interactive="try-dotnet" id="Snippet1"::: |
| 3989 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Fields/VB/fields.vb" id="Snippet1"::: |
| 3990 | +
|
3991 | 3991 | ]]></format>
|
3992 | 3992 | </remarks>
|
3993 | 3993 | <altmember cref="T:System.Int64" />
|
|
0 commit comments