CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005
    Posts
    180

    How do I update Sample Data in C#?

    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:
    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?

  2. #2
    Join Date
    Jun 2009
    Posts
    10

    Re: How do I update Sample Data in C#?

    There's not enough information here to give a meaningful response. Can you give more details? Maybe an example of how you'd like to call this method?

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured