YouTube doesn't want you know this subscribers secret
Get Free YouTube Subscribers, Views and Likes

Implementing IFormattable To Create Customizable ToString Options in C#

Follow
IAmTimCorey

The ToString method allows you to determine what the string representation of your object is going to be. For instance, you might override the ToString method to return a user's full name from a Person model. However, what if you want to allow for multiple different ToString options.

DateTime allows this by passing in a formatting string. We can do the same using the IFormattable interface provided by .NET. In this video, we will look at how to implement the IFormattable interface, as well as how to parse complex custom formatting strings.

Full Training Courses: https://IAmTimCorey.com
Source Code: https://leadmagnets.app/?Resource=IFo...

Mailing List: https://signup.iamtimcorey.com/

posted by pirategraphixkv