Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2004
    Location
    Manchester, England
    Posts
    319

    My new tutorial: Making class libraries in C#

    After my last tutorial got such a welcome response from this community, I asked everybody what they would like me to do a tutorial on next, and quite a few people suggested that I should do a tutorial that shows how to build a class library, so here it is:

    Clicky

    As before, I welcome all feedback from learners/experts alike

    Your idea is dumb!

    @njl - YEP

  2. #2
    Join Date
    Sep 2008
    Location
    Salisbury, UK
    Posts
    2,816
    /me throws rep in a northerly direction...

    I found
    my current avatar on google, so props to THIS GUY who created the original...

  3. #3
    Join Date
    Nov 2008
    Location
    41° 28′ 56″ N, 81° 40′ 11″ W
    Posts
    2,397
    Perhaps when the time comes for OOP in the C++ 101 class, you should consider writing up one of these for that time, too, for that language.
    PC Specs: Antec 900 ATX Case, Gigabyte 790GX Mobo, AMD Phenom II x4 955, Corsair HX620W PSU, Corsair Vengeance 16GB (4x4GB) DDR3-1600, EVGA GTX 680 2GB GDDR5, 3D Vision Kit 2, LG 8x Blu-ray Burner, Intel X25-M SSD, 500GB+640GB WD Caviar Blacks, Win 7 Pro x64, DAS Pro K/B, MX518 Mouse, Logitech Z-2300 Speakers, Toshiba 32TL515U 32" 3DTV, Wacom Bamboo Fun Large Tablet.

  4. #4
    Join Date
    Jan 2007
    Posts
    536
    Can you dynamically load a C# DLL?

  5. #5
    Join Date
    Oct 2011
    Posts
    409
    @Segfault

    - Some commas and dots missing.
    - Don't start sentences with so. Read the sentence that start with it then skip the so and read again.
    - But what use is that? read it a few times.
    - Show us some code man! read it a few times.
    - What is a class library? What are class libraries?
    - In the next part I will (on page one).
    - one source file for each / a source file for each
    - one page 2 so many simple it makes the reader rather uneasy.
    - Wikipedia has a rather good article on this stuff. Wikipedia has a good article [<-link placed on article] on this cipher [or here].
    - So thats it? / So that's it?

    Maybe more but that was just at a glance.

    I would suggest writing the article with spell check (maybe a WordPress plugin?) or with Google docs/drive which has that.

    Also, I would split them into 2 articles. For example, the first article related to DLL would have the code simple like:

    public double Simple_Add(double a, double b)
    {
    return a + b;
    }

    public double Segfault_Add(double a, double b)
    {
    double segfaultAdd = Random.NextDouble(); // don't have a ide opened atm so don't know if that is how you'd write this

    return a * a + segfaultAdd * a * b + b * b;
    }
    The second article, separated from this, I would call something like Creating the CaeserLib as a class library. In the beginning of that, I would suggest to the reader to go to the article about intro to class libraries if they don't understand the concept. At the end of the intro to class libraries I would also place a link for the Creating the CaeserLib as a class library.

    Now, as for the writing part, I get the sense that there was more haste in writing this then on the four ways.

    PS: Hope you don't mind the review.

  6. #6
    Join Date
    Mar 2004
    Location
    Manchester, England
    Posts
    319
    Thanks for the feedback florem, I was kind of tired when I was finishing writing it up. I will go back and take a look at all of the points you mentioned. As for splitting it up into two articles you may be right, but I didn't just want to be like every tutorial for this out there that just gives a pointless example.

    Your idea is dumb!

    @njl - YEP

  7. #7
    Join Date
    Jan 2007
    Posts
    216
    Nice tutorial! Does unit testing work for .dll projects or do you have to create a completely separate project and then add the .dll to try it?

  8. #8
    Join Date
    Mar 2004
    Location
    Manchester, England
    Posts
    319
    You can have multiple projects in one solution. If you right click on your solution, you can add another project. I like to keep my console projects separate from my logic (so I put the logic in a class library). You can add a new project specifically for unit testing into the same solution if you want.

    Your idea is dumb!

    @njl - YEP

  9. #9
    Join Date
    May 2009
    Posts
    199
    Very clear and useful Segfault, thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •