What are some best practices for where you should have helper classes in a .NET project? Referring to classes separate from business layer stuff, but presentation and app stuff like appSetting config managers and other code that would sometimes be module specific or sometimes be used throughout the app.
Writing to a file (fprintf or fputs)
A FILE is a type of structure typedef as FILE. It is considered as opaque data type as its implementation is hidden. We don't know what constitutes the type, we only use pointer to the type and library knows the internal of the type and can use the data. Definition of FILE is in stdio although it is system specific.
C is an imperative procedural language supporting structured programming, lexical variable scope, and recursion, with a static type system. It was designed to be compiled to provide low-level access to memory and language constructs that map efficiently to machine instructions, all with minimal runtime support.
I always allow things like this to be pretty fluid. That said:
I tend to put them in a utils namespace. Either in the mainproject namespace if they are pretty general e.g. MyProject.Utils.MyHelperClass
, or if they are more specific then a sub namespace MyProject.CRM.Utils.MyCRMHelperClass
.
I almost always have a MyProject.Core class library in my solution where I put things like that.
Edit: I might have answered a "bigger" question.
In a single project it all depends on the size of the project. The Microsoft Design Guidelines talks about that you shouldn't create a namespace if you have less then five(correct me if I'm wrong about this number) types within it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With