good day! I need your help.. how do you write and structure your code in a class library such that when it is built as dll other programmers can use that dll as their library more like the base class library. except that i dont know how to structure them are there any rules in writing a good library? best practices maybe? so that my library will be elegant and much like the base class libraries in .net
please help.. thanks!
Create struct Variables To allocate memory of a given structure type and work with it, we need to create variables. Another way of creating a struct variable is: struct Person { // code } person1, person2, p[20];
Structures (also called structs) are a way to group several related variables into one place. Each variable in the structure is known as a member of the structure. Unlike an array, a structure can contain many different data types (int, float, char, etc.).
Structure is a user-defined data type. It works similarly like arrays. Structures help you in grouping items of different types in a single group. It stores the collection of different data types.
We use structures to overcome the drawback of arrays. We already know that arrays in C are bound to store variables that are of similar data types. Creating a structure gives the programmer the provision to declare multiple variables of different data types treated as a single entity.
This should help: Design Guidelines for Developing Class Libraries. Actually a good reading for all .net developers.
Use static code analysis (FxCop). It'll enforce all of Microsoft's guidelines/best practices for library development.
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