Skip to content

Commit fb84e60

Browse files
committed
Address UUF on confusion around namespace
1 parent c087ef9 commit fb84e60

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

docs/get-started/csharp/tutorial-console-part-2.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Tutorial 2: Extend your C# console app"
33
description: Extend a C# console application in Visual Studio, including debugging features, managing multiple projects, and referencing third-party packages.
44
ms.custom: vs-acquisition
5-
ms.date: 09/05/2024
5+
ms.date: 10/18/2024
66
ms.subservice: general-ide
77
ms.topic: tutorial
88
ms.devlang: csharp
@@ -232,14 +232,10 @@ In Visual Studio, you use the menu command **File** > **Add** > **New Project**
232232
using CalculatorLibrary;
233233
```
234234

235-
Adding the `using` directive should let you remove the `CalculatorLibrary` namespace from the call site, but now there's an ambiguity. Is `Calculator` the class in `CalculatorLibrary`, or is `Calculator` the namespace?
236-
237-
To resolve the ambiguity, rename the namespace from `Calculator` to `CalculatorProgram` in *Program.cs*.
235+
Adding the `using` directive should let you remove the `CalculatorLibrary` namespace from the call site.
238236

239-
```csharp
240-
// Program.cs
241-
namespace CalculatorProgram
242-
```
237+
If your `Program.cs` code is in the `Calculator` namespace, rename the namespace from `Calculator` to `CalculatorProgram` to remove ambiguity between class name and namespace name.
238+
243239
::: moniker-end
244240

245241
## Reference .NET libraries: Write to a log

0 commit comments

Comments
 (0)