Saving a New Note - Day 4 - Part 8
- Posted: Nov 11, 2010 at 6:10 PM
- 17,228 Views
- 6 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Now that we have all the parts we need, it's time to construct the file name and save the file's text. Then, we’ll navigate back to the MainPage.xaml and see the new note in the ListBox.
Already have a Channel 9 account? Please sign in
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Very laborious use of the string builder. This would do it more easily.
DateTime.Now.ToString("yyyy_MM_dd_hh_mm")
Great! The StringBuilder is very useful and easy... thanks
opening thread
Hi
How can we get the last write date time of each note.
@vijay sharma: You should be able to use DateTime.Now, and then format it the way you want. This resource should help you decide how you want to format the DateTime.Now that you'll ultimately want to use as the filename:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
Is that what you're looking for? Right direction? Good luck!
Hi Bob,
Thanks for your reply. But I am interested in getting the last write date time of each file, exactly the way we are getting filename of each file inside for each loop.
Please Help...
-------------------------------------------------------------
private void bindList()
{
var appStorage = IsolatedStorageFile.GetUserStoreForApplication();
string[] fileList = appStorage.GetFileNames();
List<Note> notes = new List<Note>();
foreach (string file in fileList)
{
// Retrieve the file
string fileName = file;
// How to Retrieve the Last write time of each file ????
notes.Add(new Note() { Location = location, DateCreated = dateCreated.ToLongDateString() });
}
noteListBox.ItemsSource = notes;
}
Remove this comment
Remove this thread
close