<p>Here's the problem, you include multiple assemblies and add 'using namespaceX' at the top of your code file.<br>
Now you want to create a class or use a symbol which is defined in multiple namespaces, 
e.g. <code>System.Windows.Controls.Image</code> &amp; <code>System.Drawing.Image</code></p>

<p>Now unless you use the fully qualified name, there will be a crib/build error due to ambiguity inspite of the right 'using' declarations at the top. What is the way out here?</p>

<p><em>(Another knowledge base post.. I found the answer after about 10 minutes of searching because I didn't know the right keyword to search for)</em></p>

[{'answer_id': 61264, 'author': 'aku', 'author_id': 1196, 'author_profile': 'https://Stackoverflow.com/users/1196', 'pm_score': 6, 'selected': True, 'text': '<p>Use alias</p>\n<pre><code>using System.Windows.Controls;\nusing Drawing = System.Drawing;\n\n...\n\nImage img = ... //System.Windows.Controls.Image\nDrawing.Image img2 = ... //System.Drawing.Image\n</code></pre>\n<p><a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive" rel="nofollow noreferrer">C# using directive</a></p>\n'}, {'answer_id': 61265, 'author': 'Espo', 'author_id': 2257, 'author_profile': 'https://Stackoverflow.com/users/2257', 'pm_score': 3, 'selected': False, 'text': '<p>This page has a very good writeup on namespaces and the using-statement:</p>\n\n<p><a href="http://www.blackwasp.co.uk/Namespaces.aspx" rel="noreferrer">http://www.blackwasp.co.uk/Namespaces.aspx</a></p>\n\n<p>You want to read the part about "Creating Aliases" that will allow you to make an alias for one or both of the name spaces and reference them with that like this:</p>\n\n<pre><code>using ControlImage = System.Windows.Controls.Image;\nusing System.Drawing.Image;\n\nControlImage.Image myImage = new ControlImage.Image();\nmyImage.Width = 200;\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/61262', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1695/']