Skip to content

Commit 1340887

Browse files
authored
fixed links and some typos (#1259)
* fixed links and some typos * more fixes
1 parent 71eab62 commit 1340887

File tree

6 files changed

+40
-31
lines changed

6 files changed

+40
-31
lines changed

docs/csharp/getting-started/debugging-with-visual-studio-2017.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ Visual Studio also allows us to step line by line through a program and monitor
119119

120120
1. Choose **Debug**, **Step Into**, or press the F11 key. Visual Studio hightlights the statement that includes the `name` variable assignment. The **Autos** window shows that `name` is `null`, and the console window displays the string "What is your name?".
121121

122-
1. Respond to the prompt by entering a string in the console window and pressing Enter. The console will be unresponsive, and the string you enter won't be displayed in the console window, but the [Console.ReadLine](xref:System.Console.ReadLine()) method will nevertheless capture your input.
122+
1. Respond to the prompt by entering a string in the console window and pressing Enter. The console will be unresponsive, and the string you enter won't be displayed in the console window, but the [Console.ReadLine](xref:System.Console.ReadLine) method will nevertheless capture your input.
123123

124-
1. Choose **Debug**, **Step Into**, or press the F11 key. Visual Studio highlights the statement that includes the `date` variable assignment. The **Autos** window shows the [DateTime.Now](xref:System.DateTime.Now) property value and the value returned by the call to the [Console.ReadLine](xref:System.Console.ReadLine()) method. The console window also displays the string entered when the console prompted for input.
124+
1. Choose **Debug**, **Step Into**, or press the F11 key. Visual Studio highlights the statement that includes the `date` variable assignment. The **Autos** window shows the [DateTime.Now](xref:System.DateTime.Now) property value and the value returned by the call to the [Console.ReadLine](xref:System.Console.ReadLine) method. The console window also displays the string entered when the console prompted for input.
125125

126126
1. Choose **Debug**, **Step Into**, or press the F11 key. The **Autos** window now shows the value of the `date` variable after the assignment from the [DateTime.Now](xref:System.DateTime.Now) property. The console window is unchanged.
127127

docs/csharp/getting-started/publishing-with-visual-studio-2017.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ ms.assetid: a19545d3-24af-4a32-9778-cfb5ae938287
1515

1616
# Publishing your Hello World application with Visual Studio 2017
1717

18-
In [Building a C# Hello World application with .NET Core in VIsual Studio 2017 RC](with-visual-studio-2017.md), you built your Hello World console application, and in [Debugging your C# Hello World application with Visual Studio 2017 RC](debugging-with-visual-studio-2017.md), you tested it using the Visual Studio debugger. Now that you're sure that it works as expected, you an publish it so that other users can run it. Publishing creates the set of files that are needed to run your application; you can deploy them by copying them to a target machine.
18+
In [Building a C# Hello World application with .NET Core in Visual Studio 2017 RC](with-visual-studio-2017.md), you built your Hello World console application, and in [Debugging your C# Hello World application with Visual Studio 2017 RC](debugging-with-visual-studio-2017.md), you tested it using the Visual Studio debugger. Now that you're sure that it works as expected, you an publish it so that other users can run it. Publishing creates the set of files that are needed to run your application; you can deploy them by copying them to a target machine.
1919

2020
Publishing .NET Core console applications from Visual Studio has not yet been implemented in the RC release. It will be implemented in the final release of Visual Studio 2017.
2121

22-
You can publish your application using the [dotnet.exe](../../core/tools/dotnet.md) command line utility. To do this:
22+
You can publish your application using the [dotnet.exe](../../core/tools/dotnet.md) command-line utility. To do this:
2323

2424
1. Open a console window. For example, in the **Ask me anything** text box in the Windows taskbar, enter `Command Prompt`, and then choose the **Command Prompt** desktop app to open the console window.
2525

2626
1. Navigate to your library's project directory. Typically, unless you've reconfigured the file location, it is in the `Documents\Visual Studio 2017\Projects\HelloWorld\HelloWorld` directory. The directory contains your source code and a project file, `HelloWorld.csproj`.
2727

28-
<!-- Steve, can you check this on your system? I'm sure I didn't do any renaming, but that's the directory I have on minem and I'd expect it to be HelloWorld instead of Hello. -->
29-
3028
1. To build a debug build of your application, issue the command `dotnet.exe publish -c debug`. To publish a release build, issue the command `dotnet.exe publish -c release`. It's generally a good idea to create a debug build of your application for additional testing, and to create the release version when testing has ended.
3129

32-
[!TIP] If the directory that contains `dotnet.exe` is not in your path, you can find its location by entering `where dotnet.exe` in the console window.
30+
> [!TIP]
31+
> If the directory that contains `dotnet.exe` is not in your path, you can find its location by entering `where dotnet.exe` in the console window.
3332
3433
For debug versions, the final files are found in the `.\bin\debug\netcoreapp1.0\publish` directory. For release versions, they're found in the `.\bin\release\netcoreapp1.0\publish` directory. You can deploy them to target systems by copying the files generated by the publishing process into a single directory or folder. You do not have to include the `HelloWorld.pdb` file, which contains symbols used for debugging.
3534

docs/csharp/misc/cs0415.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ translation.priority.mt:
3939
# Compiler Error CS0415
4040
The 'IndexerName' attribute is valid only on an indexer that is not an explicit interface member declaration
4141

42-
This error occurs if you use an IndexerName attribute on an indexer that was an explicit implementation of an interface. This error may be avoided by removing the interface name from the declaration of the indexer, if possible. For more information, see the [IndexerNameAttribute Class](xref:System​.Runtime.CompilerServices.IndexerNameAttribute).
42+
This error occurs if you use an IndexerName attribute on an indexer that was an explicit implementation of an interface. This error may be avoided by removing the interface name from the declaration of the indexer, if possible. For more information, see the [IndexerNameAttribute Class](xref:System​.Runtime.CompilerServices.IndexerNameAttribute).
4343

4444
The following sample generates CS0415:
4545

46-
```
46+
```cs
4747
// CS0415.cs
4848
using System;
4949
using System.Runtime.CompilerServices;

docs/csharp/misc/cs0625.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ translation.priority.mt:
3939
# Compiler Error CS0625
4040
'field': instance field types marked with StructLayout(LayoutKind.Explicit) must have a FieldOffset attribute
4141

42-
When a struct is marked with an explicit **StructLayout** attribute, all fields in the struct must have the [FieldOffset](xref:System​.Runtime​.InteropServices.FieldOffsetAttribute) attribute. For more information, see [StructLayoutAttribute Class](xref:System​.Runtime​.InteropServices.StructLayoutAttribute).
42+
When a struct is marked with an explicit **StructLayout** attribute, all fields in the struct must have the [FieldOffset](xref:System​.Runtime​.InteropServices.FieldOffsetAttribute) attribute. For more information, see [StructLayoutAttribute Class](xref:System​.Runtime​.InteropServices.StructLayoutAttribute).
43+
44+
The following sample generates CS0625:
4345

44-
The following sample generates CS0625:
45-
46-
```
46+
```cs
4747
// CS0625.cs
4848
// compile with: /target:library
4949
using System;

docs/csharp/programming-guide/concepts/collections.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ For many applications, you want to create and manage groups of related objects.
4040

4141
- [Using a Simple Collection](#BKMK_SimpleCollection)
4242

43-
- [Kinds of Collections](http://msdn.microsoft.com/library/e76533a9-5033-4a0b-b003-9c2be60d185b)
43+
- [Kinds of Collections](#BKMK_KindsOfCollections)
4444

4545
- [System.Collections.Generic Classes](#BKMK_Generic)
4646

@@ -58,7 +58,8 @@ For many applications, you want to create and manage groups of related objects.
5858

5959
- [Iterators](#BKMK_Iterators)
6060

61-
## <a name="BKMK_SimpleCollection"></a> Using a Simple Collection
61+
<a name="BKMK_SimpleCollection"></a>
62+
## Using a Simple Collection
6263
The examples in this section use the generic <xref:System.Collections.Generic.List%601> class, which enables you to work with a strongly typed list of objects.
6364

6465
The following example creates a list of strings and then iterates through the strings by using a or [foreach](../../../csharp/language-reference/keywords/foreach-in.md) statement.
@@ -186,8 +187,9 @@ public class Galaxy
186187
public int MegaLightYears { get; set; }
187188
}
188189
```
189-
190-
## <a name="BKMK_KindsOfCollections"></a> Kinds of Collections
190+
191+
<a name="BKMK_KindsOfCollections"></a>
192+
## Kinds of Collections
191193
Many common collections are provided by the .NET Framework. For a complete list, see [collections namespace](System.Collections%20namespaces.xml). Each type of collection is designed for a specific purpose.
192194

193195
Some of the common collection classes are described in this section:
@@ -198,7 +200,8 @@ public class Galaxy
198200

199201
- `System.Collections` classes
200202

201-
### <a name="BKMK_Generic"></a> System.Collections.Generic Classes
203+
<a name="BKMK_Generic"></a>
204+
### System.Collections.Generic Classes
202205
You can create a generic collection by using one of the classes in the <xref:System.Collections.Generic> namespace. A generic collection is useful when every item in the collection has the same data type. A generic collection enforces strong typing by allowing only the desired data type to be added.
203206

204207
The following table lists some of the frequently used classes of the <xref:System.Collections.Generic?displayProperty=fullName> namespace:
@@ -213,14 +216,16 @@ public class Galaxy
213216

214217
For additional information, see [Commonly Used Collection Types](http://msdn.microsoft.com/library/f5d4c6a4-0d7b-4944-a9fb-3b12d9ebfd55), [Selecting a Collection Class](http://msdn.microsoft.com/library/ba049f9a-ce87-4cc4-b319-3f75c8ddac8a), and <xref:System.Collections.Generic?displayProperty=fullName>.
215218

216-
### <a name="BKMK_Concurrent"></a> System.Collections.Concurrent Classes
219+
<a name="BKMK_Concurrent"></a>
220+
### System.Collections.Concurrent Classes
217221
In the .NET Framework 4 or newer, the collections in the <xref:System.Collections.Concurrent> namespace provide efficient thread-safe operations for accessing collection items from multiple threads.
218222

219223
The classes in the <xref:System.Collections.Concurrent> namespace should be used instead of the corresponding types in the <xref:System.Collections.Generic?displayProperty=fullName> and <xref:System.Collections?displayProperty=fullName> namespaces whenever multiple threads are accessing the collection concurrently. For more information, see [Thread-Safe Collections](http://msdn.microsoft.com/library/2e7ca21f-786c-4367-96be-0cf3f3dcc6bd) and <xref:System.Collections.Concurrent>.
220224

221225
Some classes included in the <xref:System.Collections.Concurrent> namespace are <xref:System.Collections.Concurrent.BlockingCollection%601>, <xref:System.Collections.Concurrent.ConcurrentDictionary%602>, <xref:System.Collections.Concurrent.ConcurrentQueue%601>, and <xref:System.Collections.Concurrent.ConcurrentStack%601>.
222226

223-
### <a name="BKMK_Collections"></a> System.Collections Classes
227+
<a name="BKMK_Collections"></a>
228+
### System.Collections Classes
224229
The classes in the <xref:System.Collections?displayProperty=fullName> namespace do not store elements as specifically typed objects, but as objects of type `Object`.
225230

226231
Whenever possible, you should use the generic collections in the <xref:System.Collections.Generic?displayProperty=fullName> namespace or the <xref:System.Collections.Concurrent> namespace instead of the legacy types in the `System.Collections` namespace.
@@ -235,8 +240,9 @@ public class Galaxy
235240
|<xref:System.Collections.Stack>|Represents a last in, first out (LIFO) collection of objects.|
236241

237242
The <xref:System.Collections.Specialized> namespace provides specialized and strongly typed collection classes, such as string-only collections and linked-list and hybrid dictionaries.
238-
239-
## <a name="BKMK_KeyValuePairs"></a> Implementing a Collection of Key/Value Pairs
243+
244+
<a name="BKMK_KeyValuePairs"></a>
245+
## Implementing a Collection of Key/Value Pairs
240246
The <xref:System.Collections.Generic.Dictionary%602> generic collection enables you to access to elements in a collection by using the key of each element. Each addition to the dictionary consists of a value and its associated key. Retrieving a value by using its key is fast because the `Dictionary` class is implemented as a hash table.
241247

242248
The following example creates a `Dictionary` collection and iterates through the dictionary by using a `foreach` statement.
@@ -340,8 +346,9 @@ private static void FindInDictionary2(string symbol)
340346
Console.WriteLine("found: " + theElement.Name);
341347
}
342348
```
343-
344-
## <a name="BKMK_LINQ"></a> Using LINQ to Access a Collection
349+
350+
<a name="BKMK_LINQ"></a>
351+
## Using LINQ to Access a Collection
345352
LINQ (Language-Integrated Query) can be used to access collections. LINQ queries provide filtering, ordering, and grouping capabilities. For more information, see [Getting Started with LINQ in C#](../../../csharp/programming-guide/concepts/linq/getting-started-with-linq.md).
346353

347354
The following example runs a LINQ query against a generic `List`. The LINQ query returns a different collection that contains the results.
@@ -386,8 +393,9 @@ public class Element
386393
public int AtomicNumber { get; set; }
387394
}
388395
```
389-
390-
## <a name="BKMK_Sorting"></a> Sorting a Collection
396+
397+
<a name="BKMK_Sorting"></a>
398+
## Sorting a Collection
391399
The following example illustrates a procedure for sorting a collection. The example sorts instances of the `Car` class that are stored in a <xref:System.Collections.Generic.List%601>. The `Car` class implements the <xref:System.IComparable%601> interface, which requires that the <xref:System.IComparable%601.CompareTo%2A> method be implemented.
392400

393401
Each call to the <xref:System.IComparable%601.CompareTo%2A> method makes a single comparison that is used for sorting. User-written code in the `CompareTo` method returns a value for each comparison of the current object with another object. The value returned is less than zero if the current object is less than the other object, greater than zero if the current object is greater than the other object, and zero if they are equal. This enables you to define in code the criteria for greater than, less than, and equal.
@@ -464,10 +472,11 @@ public class Car : IComparable<Car>
464472
}
465473
```
466474

467-
## <a name="BKMK_CustomCollection"></a> Defining a Custom Collection
475+
<a name="BKMK_CustomCollection"></a>
476+
## Defining a Custom Collection
468477
You can define a collection by implementing the <xref:System.Collections.Generic.IEnumerable%601> or <xref:System.Collections.IEnumerable> interface. For additional information, see [How to: Access a Collection Class with foreach](../../../csharp/programming-guide/classes-and-structs/how-to-access-a-collection-class-with-foreach.md).
469478

470-
Although you can define a custom collection, it is usually better to instead use the collections that are included in the .NET Framework, which are described in [Kinds of Collections](http://msdn.microsoft.com/library/e76533a9-5033-4a0b-b003-9c2be60d185b) earlier in this topic.
479+
Although you can define a custom collection, it is usually better to instead use the collections that are included in the .NET Framework, which are described in [Kinds of Collections](#BKMK_KindsOfCollections) earlier in this topic.
471480

472481
The following example defines a custom collection class named `AllColors`. This class implements the <xref:System.Collections.IEnumerable> interface, which requires that the <xref:System.Collections.IEnumerable.GetEnumerator%2A> method be implemented.
473482

@@ -543,8 +552,9 @@ public class Color
543552
public string Name { get; set; }
544553
}
545554
```
546-
547-
## <a name="BKMK_Iterators"></a> Iterators
555+
556+
<a name="BKMK_Iterators"></a>
557+
## Iterators
548558
An *iterator* is used to perform a custom iteration over a collection. An iterator can be a method or a `get` accessor. An iterator uses a [yield return](../../../csharp/language-reference/keywords/yield.md) statement to return each element of the collection one at a time.
549559

550560
You call an iterator by using a [foreach](../../../csharp/language-reference/keywords/foreach-in.md) statement. Each iteration of the `foreach` loop calls the iterator. When a `yield return` statement is reached in the iterator, an expression is returned, and the current location in code is retained. Execution is restarted from that location the next time that the iterator is called.

docs/visual-basic/language-reference/error-messages/elementname-is-obsolete-visual-basic-warning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ A statement attempts to access a programming element which has been marked with
5050
- Ensure that the source-code reference is spelling the element name correctly.
5151

5252
## See Also
53-
[Attributes](../../../../visual-basic/programming-guide/concepts/attributes/index.md)
53+
[Attributes](../../../visual-basic/programming-guide/concepts/attributes/index.md)

0 commit comments

Comments
 (0)