Creating the Note Naming Convention - Day 4 - Part 4
- Posted: Nov 11, 2010 at 6:10 PM
- 17,898 Views
- 4 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…”
In this video, Bob discusses the strategy of using the file name as a means of storing the date and time the note was created, along with the location of the note’s composition. This requires quite a bit of familiarity with String and DateTime classes and their methods for formatting and parsing through data.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
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?
Writing the code to parse the date / time from the file name at 15 mins was a bit painful, much easier with
DateTime dateCreated = DateTime.ParseExact(file.Substring(0,16), "yyyy_MM_dd_HH_mm",System.Globalization.CultureInfo.InvariantCulture);
Hi,
Great video! One problem tho
string[] fileList = appStorage.GetFileNames();
creates collection starting at [0]. Running debug/emulator, I cannot get location to display on Page_Load in [0]. So I have to run thru the loop once, then hit the Add_Button(+) on Mainpage then continue loop for location to display in [1]. Any reason [0] is reserved for anything? Anybody else have same prob?
Thanks,
E.
Got it worked out.@ELMDEV:
I hate to write
string
location = file.Substring(19);
It had to have a 19 instead of a 20, with 20 it cut off the R in Redmond, I dont know why cos i had everything else correct, and it picked up the date and time just right.
Remove this comment
Remove this thread
close