TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
JOHN JOHNNNY
NA
190
140.1k
Message Box
Jan 22 2015 12:49 AM
Hi
Is there a way i can read my json file stored in my folder in the message box i have tried the with the code below but keeps getting error
//Message box code
List<string> strings = new List<string>() { "Friday 16Th 6PM", "Sunday 18TH 10AM & 7PM", "Wednesday 21st 6PM", "Friday 23RD 6PM", "Sunday 25th 10AM & 7PM", "Wednesday 28th 6PM", "Friday 30th 6PM", };
public ListPicker()
{
InitializeComponent();
lbx.ItemsSource = strings;
lbx.SelectionChanged += lbx_SelectionChanged;
}
void lbx_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
value = lbx.SelectedIndex;
switch (value)
{
case 0:MessageBox.Show("");
break;
case 1: MessageBox.Show("");
break;
case 2: MessageBox.Show(" ");
break;
case 3: MessageBox.Show(" ");
break;
case 4: MessageBox.Show(" ");
break;
case 5: MessageBox.Show("");
break;
}
}
public int value { get; set; }
//Json file reference code
string filepath = @"Assets\resources.json";
StorageFolder folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
StorageFile file = await folder.GetFileAsync(filepath); // error here
var data = await Windows.Storage.FileIO.ReadTextAsync(file);
Thank you in advance and reply soon
Reply
Answers (
1
)
how to get the total number of original records
C# object to json but some properties need to hide..