Skip to content

Commit 041a6d1

Browse files
authored
remove code.msdn.microsoft.com links (#7377)
1 parent a3ce75b commit 041a6d1

28 files changed

+21
-88
lines changed

xml/System.Collections.Generic/IEnumerable`1.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@
6767
The following example demonstrates how to implement the <xref:System.Collections.Generic.IEnumerable%601> interface and how to use that implementation to create a LINQ query. When you implement <xref:System.Collections.Generic.IEnumerable%601>, you must also implement <xref:System.Collections.Generic.IEnumerator%601> or, for C# only, you can use the [yield](/dotnet/csharp/language-reference/keywords/yield) keyword. Implementing <xref:System.Collections.Generic.IEnumerator%601> also requires <xref:System.IDisposable> to be implemented, which you will see in this example.
6868
6969
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.ienumerableex/cs/program.cs" id="Snippet1":::
70-
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.ienumerableex/vb/module1.vb" id="Snippet1":::
71-
72-
For another C# example that demonstrates how to implement the <xref:System.Collections.Generic.IEnumerable%601> interface, see the [Generics Sample](https://code.msdn.microsoft.com/Generics-Sample-C-9b41a192/sourcecode?fileId=46476&pathId=1364935593). This sample uses the `yield` keyword instead of implementing <xref:System.Collections.Generic.IEnumerator%601>.
70+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.ienumerableex/vb/module1.vb" id="Snippet1":::
7371
7472
]]></format>
7573
</remarks>
@@ -81,7 +79,6 @@
8179
<related type="Article" href="/dotnet/visual-basic/programming-guide/language-features/control-flow/walkthrough-implementing-ienumerable-of-t">Walkthrough: Implementing IEnumerable(Of T) in Visual Basic</related>
8280
<related type="Article" href="/dotnet/csharp/programming-guide/concepts/iterators">Iterators (C#)</related>
8381
<related type="Article" href="/dotnet/visual-basic/programming-guide/concepts/iterators">Iterators (Visual Basic)</related>
84-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/Generics-Sample-C-9b41a192/sourcecode?fileId=46476&amp;pathId=1364935593">Generics Sample</related>
8582
</Docs>
8683
<Members>
8784
<Member MemberName="GetEnumerator">
@@ -140,17 +137,13 @@
140137
141138
An enumerator does not have exclusive access to the collection so an enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is invalidated and you may get unexpected results. Also, enumerating a collection is not a thread-safe procedure. To guarantee thread-safety, you should lock the collection during enumerator or implement synchronization on the collection.
142139
143-
Default implementations of collections in the <xref:System.Collections.Generic?displayProperty=nameWithType> namespace aren't synchronized.
144-
145-
140+
Default implementations of collections in the <xref:System.Collections.Generic?displayProperty=nameWithType> namespace aren't synchronized.
146141
147142
## Examples
148143
The following example demonstrates how to implement the <xref:System.Collections.Generic.IEnumerable%601> interface and uses that implementation to create a LINQ query. When you implement <xref:System.Collections.Generic.IEnumerable%601>, you must also implement <xref:System.Collections.Generic.IEnumerator%601> or, for C# only, you can use the [yield](/dotnet/csharp/language-reference/keywords/yield) keyword. Implementing <xref:System.Collections.Generic.IEnumerator%601> also requires <xref:System.IDisposable> to be implemented, which you will see in this example.
149144
150145
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.ienumerableex/cs/program.cs" id="Snippet1":::
151-
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.ienumerableex/vb/module1.vb" id="Snippet1":::
152-
153-
For another C# example that demonstrates how to implement the <xref:System.Collections.Generic.IEnumerable%601> interface, see the [Generics Sample](https://code.msdn.microsoft.com/Generics-Sample-C-9b41a192/sourcecode?fileId=46476&pathId=1364935593). This sample uses of the `yield` keyword instead of implementing <xref:System.Collections.Generic.IEnumerator%601>.
146+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.ienumerableex/vb/module1.vb" id="Snippet1":::
154147
155148
]]></format>
156149
</remarks>

xml/System.Collections/IEnumerable.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,10 @@
5353
## Remarks
5454
<xref:System.Collections.IEnumerable> is the base interface for all non-generic collections that can be enumerated. For the generic version of this interface see <xref:System.Collections.Generic.IEnumerable%601?displayProperty=nameWithType>. <xref:System.Collections.IEnumerable> contains a single method, <xref:System.Collections.IEnumerable.GetEnumerator%2A>, which returns an <xref:System.Collections.IEnumerator>. <xref:System.Collections.IEnumerator> provides the ability to iterate through the collection by exposing a <xref:System.Collections.IEnumerator.Current%2A> property and <xref:System.Collections.IEnumerator.MoveNext%2A> and <xref:System.Collections.IEnumerator.Reset%2A> methods.
5555
56-
It is a best practice to implement <xref:System.Collections.IEnumerable> and <xref:System.Collections.IEnumerator> on your collection classes to enable the `foreach` (`For Each` in Visual Basic) syntax, however implementing <xref:System.Collections.IEnumerable> is not required. If your collection does not implement <xref:System.Collections.IEnumerable>, you must still follow the iterator pattern to support this syntax by providing a `GetEnumerator` method that returns an interface, class or struct. When using Visual Basic, you must provide an <xref:System.Collections.IEnumerator> implementation, which is returned by `GetEnumerator`. When developing with C# you must provide a class that contains a `Current` property, and `MoveNext` and `Reset` methods as described by <xref:System.Collections.IEnumerator>, but the class does not have to implement <xref:System.Collections.IEnumerator>.
57-
58-
56+
It is a best practice to implement <xref:System.Collections.IEnumerable> and <xref:System.Collections.IEnumerator> on your collection classes to enable the `foreach` (`For Each` in Visual Basic) syntax, however implementing <xref:System.Collections.IEnumerable> is not required. If your collection does not implement <xref:System.Collections.IEnumerable>, you must still follow the iterator pattern to support this syntax by providing a `GetEnumerator` method that returns an interface, class or struct. When using Visual Basic, you must provide an <xref:System.Collections.IEnumerator> implementation, which is returned by `GetEnumerator`. When developing with C# you must provide a class that contains a `Current` property, and `MoveNext` and `Reset` methods as described by <xref:System.Collections.IEnumerator>, but the class does not have to implement <xref:System.Collections.IEnumerator>.
5957
6058
## Examples
61-
The following code example demonstrates the best practice for iterating a custom collection by implementing the <xref:System.Collections.IEnumerable> and <xref:System.Collections.IEnumerator> interfaces. In this example, members of these interfaces are not explicitly called, but they are implemented to support the use of `foreach` (`For Each` in Visual Basic) to iterate through the collection. This example is a complete Console app. To compile the Visual Basic app, change the **Startup object** to **Sub Main** in the project's **Properties** page.
62-
63-
For a sample that shows how to implement the <xref:System.Collections.IEnumerable> interface, see [Implementing the IEnumerable Interface in a Collection Class](https://code.msdn.microsoft.com/Implementing-the-e1708a24)
59+
The following code example demonstrates the best practice for iterating a custom collection by implementing the <xref:System.Collections.IEnumerable> and <xref:System.Collections.IEnumerator> interfaces. In this example, members of these interfaces are not explicitly called, but they are implemented to support the use of `foreach` (`For Each` in Visual Basic) to iterate through the collection. This example is a complete Console app. To compile the Visual Basic app, change the **Startup object** to **Sub Main** in the project's **Properties** page.
6460
6561
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections_EnumeratorInterfaces/cs/ienumerator.cs" id="Snippet1":::
6662
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections_EnumeratorInterfaces/vb/ienumerator.vb" id="Snippet1":::
@@ -71,7 +67,6 @@
7167
<altmember cref="T:System.Collections.Generic.IEnumerable`1" />
7268
<related type="Article" href="/dotnet/csharp/programming-guide/concepts/iterators">Iterators (C#)</related>
7369
<related type="Article" href="/dotnet/visual-basic/programming-guide/concepts/iterators">Iterators (Visual Basic)</related>
74-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/Implementing-the-e1708a24">Implementing the IEnumerable Interface in a Collection Class</related>
7570
</Docs>
7671
<Members>
7772
<Member MemberName="GetEnumerator">

xml/System.Data.SqlClient/SqlConnection.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,8 +2184,6 @@ ALTER TABLE [dbo].[Course] CHECK CONSTRAINT [FK_Course_Department]
21842184
GO
21852185
```
21862186
2187-
[How to Get Schema Information from Database](https://code.msdn.microsoft.com/How-to-Get-Schema-b66d62e2) has C# and Visual Basic versions of this code sample in a Visual Studio project.
2188-
21892187
```csharp
21902188
using System;
21912189
using System.Data;

xml/System.Data/DataSet.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ If these classes have been subclassed, the copy will also be of the same subclas
17551755
</MySchool>
17561756
```
17571757
1758-
Now you can compile and run the following source code. [How to Store Data of DataSet into XML File](https://code.msdn.microsoft.com/How-to-Store-Data-of-7b9710f3) has Visual Basic and C# projects for this sample.
1758+
Now you can compile and run the following source code.
17591759
17601760
```csharp
17611761
using System;

xml/System.Data/DataTable.xml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ For information about DataSet and DataTable security, see [Security guidance](/d
159159

160160
- Insert the values and display the tables.
161161

162-
- Create the expression columns and display the tables.
163-
164-
C# and Visual Basic projects with this code sample can be found on [Developer Code Samples](https://code.msdn.microsoft.com/How-to-create-DataTable-7abb4914).
162+
- Create the expression columns and display the tables.
165163

166164
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_ADO.NET/classic webdata datatable example2/cs/source.cs" id="Snippet1":::
167165
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/classic webdata datatable example2/vb/source.vb" id="Snippet1":::
@@ -761,9 +759,7 @@ For information about DataSet and DataTable security, see [Security guidance](/d
761759
## Remarks
762760
If these classes have been derived, the clone will also be of the same derived classes.
763761

764-
Clone creates a new <xref:System.Data.DataTable> with the same structure as the original <xref:System.Data.DataTable>, but does not copy any data (the new <xref:System.Data.DataTable> will not contain any `DataRows`). To copy both the structure and data into a new <xref:System.Data.DataTable>, use <xref:System.Data.DataTable.Copy%2A>.
765-
766-
762+
Clone creates a new <xref:System.Data.DataTable> with the same structure as the original <xref:System.Data.DataTable>, but does not copy any data (the new <xref:System.Data.DataTable> will not contain any `DataRows`). To copy both the structure and data into a new <xref:System.Data.DataTable>, use <xref:System.Data.DataTable.Copy%2A>.
767763

768764
## Examples
769765
The following sample demonstrates how to update the structure and constraints of the destination table after you execute DataTable.Clone. The ClonedDataTable class will return a destination table and includes all the updating events. After the clone, structure changes in the source table won't be reflected in the destination table. Specifically, this sample will:
@@ -772,9 +768,7 @@ For information about DataSet and DataTable security, see [Security guidance](/d
772768

773769
- Update the changes of the UniqueConstraint in source table.
774770

775-
- Update the changes of the ForeignKeyConstraint in source table.
776-
777-
C# and Visual Basic projects with this code sample can be found on [Developer Code Samples](https://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&f%5B0%5D.Value=How%20to%20automically%20update%20the%20structure%20of%20a%20cloned%20DataTable).
771+
- Update the changes of the ForeignKeyConstraint in source table.
778772

779773
```csharp
780774
using System;
@@ -1107,9 +1101,7 @@ REFERENCES [dbo].[Department] ([DepartmentID])
11071101
GO
11081102
ALTER TABLE [dbo].[Course] CHECK CONSTRAINT [FK_Course_Department]
11091103
GO
1110-
```
1111-
1112-
You can now compile and run the sample. [How to modify data in DataTable and update to the data source](https://code.msdn.microsoft.com/How-to-modify-data-in-c68d35f4) has Visual Basic and C# projects of this sample.
1104+
```
11131105

11141106
```csharp
11151107
using System;

xml/System.Data/IsolationLevel.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ When using <xref:System.Data.Odbc.OdbcTransaction>, if you do not set <xref:Syst
144144
145145
- Roll back the transaction in first thread.
146146
147-
If the transaction allows the behavior, the Quantity value will be added twice.
148-
149-
C# and Visual Basic projects with this code sample can be found on [Developer Code Samples](https://code.msdn.microsoft.com/site/search?query=How%20to%20use%20IsolationLevel%20Enumeration%20in%20DbTransaction&f%5B0%5D.Value=How%20to%20use%20IsolationLevel%20Enumeration%20in%20DbTransaction&f%5B0%5D.Type=SearchText&ac=4).
147+
If the transaction allows the behavior, the Quantity value will be added twice.
150148
151149
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_ADO.NET/system_data_isolationlevel/cs/source.cs" id="Snippet1":::
152150
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_ADO.NET/system_data_isolationlevel/vb/source.vb" id="Snippet1":::

xml/System.Diagnostics/Process.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
<altmember cref="M:System.Diagnostics.Process.CloseMainWindow" />
150150
<altmember cref="M:System.Diagnostics.Process.Kill" />
151151
<altmember cref="T:System.Diagnostics.ProcessThread" />
152-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/windowsdesktop/Using-the-NET-Process-Class-d70597ef">Using the .NET Process Class</related>
153152
</Docs>
154153
<Members>
155154
<Member MemberName=".ctor">

xml/System.Globalization/Calendar.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@
147147
<altmember cref="T:System.Globalization.ThaiBuddhistCalendar" />
148148
<altmember cref="T:System.Globalization.UmAlQuraCalendar" />
149149
<related type="Article" href="/dotnet/standard/datetime/working-with-calendars">Working with Calendars</related>
150-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/NET-Framework-4-Calendar-3360a84a">Sample: Calendar Week Range Utility</related>
151150
</Docs>
152151
<Members>
153152
<Member MemberName=".ctor">
@@ -3343,7 +3342,6 @@ This method returns a date and time based on the current era of a particular cal
33433342
<altmember cref="T:System.DateTime" />
33443343
<altmember cref="M:System.Globalization.Calendar.GetMonthsInYear(System.Int32)" />
33453344
<altmember cref="M:System.Globalization.Calendar.GetDaysInMonth(System.Int32,System.Int32)" />
3346-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/NET-Framework-4-Calendar-3360a84a">Sample: Calendar Week Range Utility</related>
33473345
</Docs>
33483346
</Member>
33493347
<Member MemberName="ToDateTime">
@@ -3449,7 +3447,6 @@ This method returns a date and time based on the current era of a particular cal
34493447
<altmember cref="P:System.Globalization.Calendar.Eras" />
34503448
<altmember cref="M:System.Globalization.Calendar.GetMonthsInYear(System.Int32)" />
34513449
<altmember cref="M:System.Globalization.Calendar.GetDaysInMonth(System.Int32,System.Int32)" />
3452-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/NET-Framework-4-Calendar-3360a84a">Sample: Calendar Week Range Utility</related>
34533450
</Docs>
34543451
</Member>
34553452
<Member MemberName="ToFourDigitYear">

xml/System.Globalization/EastAsianLunisolarCalendar.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
]]></format>
7272
</remarks>
7373
<related type="Article" href="/dotnet/standard/datetime/working-with-calendars">Working with Calendars</related>
74-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/NET-Framework-4-Calendar-3360a84a">Sample: Calendar Week Range Utility</related>
7574
</Docs>
7675
<Members>
7776
<Member MemberName="AddMonths">

xml/System.Globalization/GregorianCalendar.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
<altmember cref="P:System.Globalization.CultureInfo.Calendar" />
9999
<altmember cref="P:System.Globalization.CultureInfo.OptionalCalendars" />
100100
<related type="Article" href="/dotnet/standard/datetime/working-with-calendars">Working with Calendars</related>
101-
<related type="ExternalDocumentation" href="https://code.msdn.microsoft.com/NET-Framework-4-Calendar-3360a84a">Sample: Calendar Week Range Utility</related>
102101
</Docs>
103102
<Members>
104103
<MemberGroup MemberName=".ctor">

0 commit comments

Comments
 (0)