"MainPage.ReadJsonFile(String):not all code parts return value"
//JSON starts here public string ReadJsonFile(string JsonfilePath) { using (StreamReader r = new StreamReader("Dec1.js")) { string json = r.ReadToEnd(); dynamic array = JsonConvert.DeserializeObject(json); //... read text from json file return string text } } //Daily Devotion starts here protected override void OnNavigatedTo(NavigationEventArgs e) { AddDevotions(); int index = DateTime.Now.DayOfYear; textblock.Text = devotions[index]; } List<string> devotions = new List<string>(); private void AddDevotions() { devotions.Add(ReadJsonFile("Assets/Dec1.js")); devotions.Add(ReadJsonFile("Assets/Dec2.js")); devotions.Add(ReadJsonFile("Assets/Dec3.js")); //...for 365 days }
public string ReadJsonFile(string JsonfilePath) { string strText= ""; using (StreamReader r = new StreamReader("Dec1.js")) { string json = r.ReadToEnd(); dynamic array = JsonConvert.DeserializeObject(json); //... fill strText } return strText; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)