How do I update Sample Data in C#?

Discussion in 'Software' started by Xarzu, Sep 23, 2011.

  1. Xarzu

    Xarzu Private E-2

    How do I update Sample Data in C#?

    I have this sample data. Right now it is defined in a seperate C# file like this:
    Code:
        public class SampleData
        {
    
            public static ObservableCollection<Product> GetSampleData()
            {
                ObservableCollection<Product> teams = new ObservableCollection<Product>();
            }
        }
    and I load the obsevableCollection inside GetSampleData().

    It works and I am able to get the sample data anywhere in my program.

    But how can I redesign this code so that I can create the sample data on the fly from outside the class?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds