How do I update Sample Data in C#? [Resolved]

Posted by Zhang JingChu under C# on 9/23/2011 | Points: 10 | Views : 1348 | Status : [Member] | Replies : 1
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?


Posted by: Blessyjees on: 9/26/2011 [Member] Bronze | Points: 50


Is outside means database?. Currentlyhave you set static data in the class. If so it moves to database.

Blessy Baby
Digitalmesh Softech pvt Ltd

Zhang JingChu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response