From 715d6e3f199b2fc929f2309bb570b2b4b95ba7cc Mon Sep 17 00:00:00 2001 From: Shankar Date: Sat, 23 May 2020 09:14:06 +0530 Subject: [PATCH 1/7] Added information on how to achieve it using visual studio Explanation on how to do it using Visual Studio --- .../keywords/extern-alias.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index ae1d0527807e8..4f414a56cf0e4 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -31,6 +31,25 @@ You might have to reference two versions of assemblies that have the same fully- In the previous example, `GridV1::Grid` would be the grid control from `grid.dll`, and `GridV2::Grid` would be the grid control from `grid20.dll`. +## Using Visual Studio: +If you are using Visual Studio, aliase can be provided in similar way. + +Add reference of grid.dll and grid20.dll to you project in visual studio. Open a property tab and change the Aliases from global to GridV1 and GridV2 respectively + +Use these aliases the same way above +```csharp + extern alias GridV1; + + extern alias GridV2; +``` +Now you can create alias for a namespace or a type by *using alias directive* See [using directive](using-directive.md) for more information + +```csharp +using Class1V1 = GridV1::Namespace.Class1; + +using Class1V2 = GridV2::Namespace.Class1; +``` + ## C# Language Specification [!INCLUDE[CSharplangspec](~/includes/csharplangspec-md.md)] From 47cbe6d3be49d69f29936f9c7e642847f0ea9e5a Mon Sep 17 00:00:00 2001 From: Shankar Date: Sat, 23 May 2020 09:32:51 +0530 Subject: [PATCH 2/7] Update extern-alias.md --- docs/csharp/language-reference/keywords/extern-alias.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index 4f414a56cf0e4..28ddbdf2f3f18 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -37,11 +37,13 @@ If you are using Visual Studio, aliase can be provided in similar way. Add reference of grid.dll and grid20.dll to you project in visual studio. Open a property tab and change the Aliases from global to GridV1 and GridV2 respectively Use these aliases the same way above + ```csharp extern alias GridV1; extern alias GridV2; ``` + Now you can create alias for a namespace or a type by *using alias directive* See [using directive](using-directive.md) for more information ```csharp From aa9e44ec0bc15c9c4114e9929262f38d07b6aec3 Mon Sep 17 00:00:00 2001 From: Shankar Date: Sun, 24 May 2020 18:57:22 +0530 Subject: [PATCH 3/7] Update docs/csharp/language-reference/keywords/extern-alias.md Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> --- docs/csharp/language-reference/keywords/extern-alias.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index 28ddbdf2f3f18..a381e79470291 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -32,7 +32,8 @@ You might have to reference two versions of assemblies that have the same fully- In the previous example, `GridV1::Grid` would be the grid control from `grid.dll`, and `GridV2::Grid` would be the grid control from `grid20.dll`. ## Using Visual Studio: -If you are using Visual Studio, aliase can be provided in similar way. + +If you are using Visual Studio, aliase can be provided in similar way. Add reference of grid.dll and grid20.dll to you project in visual studio. Open a property tab and change the Aliases from global to GridV1 and GridV2 respectively From 13cd8757f899eecfcb9bdb6510daebe4efb80da4 Mon Sep 17 00:00:00 2001 From: Shankar Date: Sun, 24 May 2020 18:57:32 +0530 Subject: [PATCH 4/7] Update docs/csharp/language-reference/keywords/extern-alias.md Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> --- docs/csharp/language-reference/keywords/extern-alias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index a381e79470291..2b08a775b6bbd 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -31,7 +31,7 @@ You might have to reference two versions of assemblies that have the same fully- In the previous example, `GridV1::Grid` would be the grid control from `grid.dll`, and `GridV2::Grid` would be the grid control from `grid20.dll`. -## Using Visual Studio: +## Using Visual Studio If you are using Visual Studio, aliase can be provided in similar way. From e3d62e92f912b8f0e7a6ae2fc60e6ed9e9c4f34f Mon Sep 17 00:00:00 2001 From: Shankar Date: Sun, 24 May 2020 18:57:44 +0530 Subject: [PATCH 5/7] Update docs/csharp/language-reference/keywords/extern-alias.md Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> --- docs/csharp/language-reference/keywords/extern-alias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index 2b08a775b6bbd..3e9a042a0d8de 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -45,7 +45,7 @@ Use these aliases the same way above extern alias GridV2; ``` -Now you can create alias for a namespace or a type by *using alias directive* See [using directive](using-directive.md) for more information +Now you can create alias for a namespace or a type by *using alias directive*. For more information, see [using directive](using-directive.md). ```csharp using Class1V1 = GridV1::Namespace.Class1; From 86454dc9ce78195d70e5e4d06f29ce60fcd1513b Mon Sep 17 00:00:00 2001 From: Shankar Date: Sun, 24 May 2020 18:58:15 +0530 Subject: [PATCH 6/7] Update docs/csharp/language-reference/keywords/extern-alias.md Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> --- docs/csharp/language-reference/keywords/extern-alias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index 3e9a042a0d8de..1e1302dd26ca6 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -35,7 +35,7 @@ You might have to reference two versions of assemblies that have the same fully- If you are using Visual Studio, aliase can be provided in similar way. -Add reference of grid.dll and grid20.dll to you project in visual studio. Open a property tab and change the Aliases from global to GridV1 and GridV2 respectively +Add reference of *grid.dll* and *grid20.dll* to your project in Visual Studio. Open a property tab and change the Aliases from global to GridV1 and GridV2 respectively. Use these aliases the same way above From 8f289ec4de071e4f0744bb9667e00fac134f5f0c Mon Sep 17 00:00:00 2001 From: Shankar Date: Wed, 8 Jul 2020 09:18:46 +0530 Subject: [PATCH 7/7] Update docs/csharp/language-reference/keywords/extern-alias.md Co-authored-by: Bill Wagner --- docs/csharp/language-reference/keywords/extern-alias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/keywords/extern-alias.md b/docs/csharp/language-reference/keywords/extern-alias.md index 1e1302dd26ca6..30907d0282abf 100644 --- a/docs/csharp/language-reference/keywords/extern-alias.md +++ b/docs/csharp/language-reference/keywords/extern-alias.md @@ -33,7 +33,7 @@ You might have to reference two versions of assemblies that have the same fully- ## Using Visual Studio -If you are using Visual Studio, aliase can be provided in similar way. +If you are using Visual Studio, aliases can be provided in similar way. Add reference of *grid.dll* and *grid20.dll* to your project in Visual Studio. Open a property tab and change the Aliases from global to GridV1 and GridV2 respectively.