File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,8 @@ type to contain the information you use from this response. Let's build this slo
209209a simple C# type that contains the name of the repository:
210210
211211``` cs
212+ using System ;
213+
212214namespace WebAPIClient
213215{
214216 public class repo
@@ -474,9 +476,17 @@ Let's go over the new constructs above. The `IgnoreDataMember` attribute instruc
474476that this type should not be read to or written from any JSON object. This property contains only a
475477` get ` accessor. There is no ` set ` accessor. That's how you define a * read only* property in C#. (Yes,
476478you can create * write only* properties in C#, but their value is limited.) The ` DateTime.ParseExact `
477- method parses a string and creates a ` DateTime ` object to return. If the parse operation fails, the
479+ method parses a string and creates a ` DateTime ` object using a provided date format, and adds additional
480+ metadata to the ` DateTime ` using a ` CultureInfo ` object. If the parse operation fails, the
478481property accessor throws an exception.
479482
483+ To use ` CultureInfo.InvariantCulture ` , you will need to add ` System.Globalization ` to the using statements
484+ in ` repo.cs ` :
485+
486+ ``` cs
487+ using System .Globalization ;
488+ ```
489+
480490Finally, add one more output statement in the console, and you're ready to build and run this app
481491again:
482492
You can’t perform that action at this time.
0 commit comments