Skip to content

Commit 5a9a993

Browse files
authored
remove interactive from F# snippet refs (#8216)
1 parent 4590b51 commit 5a9a993

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

xml/System/ArgumentOutOfRangeException.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The conditions in which an <xref:System.ArgumentOutOfRangeException> exception i
109109
3. You're attempting to retrieve an item whose index is negative. This usually occurs because you've searched a collection for the index of a particular element and have erroneously assumed that the search is successful. In the following example, the call to the <xref:System.Collections.Generic.List%601.FindIndex%28System.Predicate%7B%600%7D%29?displayProperty=nameWithType> method fails to find a string equal to "Z" and so returns -1. However, this is an invalid index value.
110110
111111
:::code language="csharp" source="~/snippets/csharp/System/ArgumentOutOfRangeException/Overview/BadSearch.cs" interactive="try-dotnet" id="Snippet6":::
112-
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/BadSearch.fs" interactive="try-dotnet" id="Snippet6":::
112+
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/fs/BadSearch.fs" id="Snippet6":::
113113
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.ArgumentOutOfRangeException/vb/BadSearch.vb" id="Snippet6":::
114114
115115
To prevent the exception, check that the search is successful by making sure that the returned index is greater than or equal to zero before attempting to retrieve the item from the collection, as the following code fragment does.

xml/System/String.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8705,7 +8705,7 @@ The <xref:System.Runtime.CompilerServices.CompilationRelaxations.NoStringInterni
87058705
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.string.isnullorempty/cpp/isnullorempty1.cpp" id="Snippet1":::
87068706
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/isnullorempty1.cs" interactive="try-dotnet-method" id="Snippet1":::
87078707
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.string.isnullorempty/vb/isnullorempty1.vb" id="Snippet1":::
8708-
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/isnullorempty1.fs" interactive="try-dotnet-method" id="Snippet1":::
8708+
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/isnullorempty1.fs" id="Snippet1":::
87098709

87108710
You can use the <xref:System.String.IsNullOrWhiteSpace%2A> method to test whether a string is `null`, its value is <xref:System.String.Empty?displayProperty=nameWithType>, or it consists only of white-space characters.
87118711

@@ -8716,7 +8716,7 @@ A string is `null` if it has not been assigned a value (in C++ and Visual Basic)
87168716
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.string.isnullorempty/cpp/NullString1.cpp" id="Snippet2":::
87178717
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/NullString1.cs" interactive="try-dotnet-method" id="Snippet2":::
87188718
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.string.isnullorempty/vb/NullString1.vb" id="Snippet2":::
8719-
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/NullString1.fs" interactive="try-dotnet-method" id="Snippet2":::
8719+
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/NullString1.fs" id="Snippet2":::
87208720

87218721
## What is an empty string?
87228722

@@ -8725,15 +8725,15 @@ A string is empty if it is explicitly assigned an empty string ("") or <xref:Sy
87258725
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.string.isnullorempty/cpp/NullString1.cpp" id="Snippet3":::
87268726
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/NullString1.cs" interactive="try-dotnet-method" id="Snippet3":::
87278727
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.string.isnullorempty/vb/NullString1.vb" id="Snippet3":::
8728-
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/NullString2.fs" interactive="try-dotnet-method" id="Snippet3":::
8728+
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/NullString2.fs" id="Snippet3":::
87298729

87308730
## Examples
87318731
The following example examines three strings and determines whether each string has a value, is an empty string, or is `null`.
87328732

87338733
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/string.isNullOrEmpty/CPP/inoe.cpp" id="Snippet1":::
87348734
:::code language="csharp" source="~/snippets/csharp/System/String/IsNullOrEmpty/inoe.cs" interactive="try-dotnet-method" id="Snippet1":::
87358735
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/string.isNullOrEmpty/VB/inoe.vb" id="Snippet1":::
8736-
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/inoe.fs" interactive="try-dotnet-method" id="Snippet1":::
8736+
:::code language="fsharp" source="~/snippets/fsharp/System/String/IsNullOrEmpty/inoe.fs" id="Snippet1":::
87378737

87388738
]]></format>
87398739
</remarks>

0 commit comments

Comments
 (0)