Sunday 13 January 2019

Using statements before or after Namespace in C#


Possible Duplicate:
Should Usings be inside or outside the namespace






So there are two approaches to where you have your using statements in regard to the namespace. You can either have them outside the namespace declaration or inside. What is the pro/con between the two approaches and which is generally preferred.




using System;

namespace MyNamespace
{
}


or:



namespace MyNamespace

{
using System;
}

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...