Click here to Skip to main content
15,884,836 members
Articles / Programming Languages / C#

Arithmetic in Generic Classes in C#

Rate me:
Please Sign up or sign in to vote.
4.65/5 (11 votes)
23 Feb 2009CC (ASA 2.5)8 min read 72.5K   556   27  
A discussion of doing arithmetic in generic classes and a small utility to make it easy.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Design;

namespace RichTextBoxDAL {

    [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] 
    public class RichTextBoxDesigner : System.Windows.Forms.Design.ControlDesigner {

        private DesignerActionListCollection fActionLists;


        public override DesignerActionListCollection ActionLists {
            get {
                if (null == fActionLists) {
                    fActionLists = new DesignerActionListCollection();
                    fActionLists.Add(
                        new RTBDAL(this.Component));
                }
                return fActionLists;
            }
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-ShareAlike 2.5 License


Written By
Software Developer (Senior) Coleman Insights
United States United States
Bill Fugina

Bill is a software developer at Coleman Insights.
He has been working professionally with C# and .Net since Visual Studio 2003 and for fun since the public beta. Before .Net, Bill worked with Delphi and Object Pascal.

Bill blogs at http://www.dogspots.com

Comments and Discussions