#27 Overriding ToString - C# Tutorials for Beginners | CoffeeNCode
Автор: CoffeeNCode
Загружено: 2021-05-09
Просмотров: 3030
Описание:
How to override ToString to make better functioning classes in Visual Studio using C#!
🎓C# Ultimate masterclass course with tasks & projects - 73% off! ⬇️
https://csharp.codewithaba.com/udemy
💖 Become a Patron: Show support & get perks!
/ coffeencode
💻 Community Discord server
/ discord
When you join the server, you can get your own personal help channel for FREE where you can post anything you're stuck with and I will help you 😊
☕ Buy me a Coffee
https://ko-fi.com/coffeencode
https://www.buymeacoffee.com/coffeencode
Overriding the ToString method can open your code up to different use cases, its stops the use for another function just to print details about a certain class. You can create shorter outputs to the screen by making sure you override ToString which will let you specify your own return like in the video you can display the details about a Person without having to write another function.
Theory aside, they are used to make your code a lot smaller and neater to read when you are doing something simple and it can help the readability and maintainability of your code when others or you (in the future) reads it again!
📣 Socials
/ codewithaba
/ codewithaba
Timestamps:
0:00 Intro
0:25 Examples
3:50 ToString refactor
5:45 Recap
7:33 Outro & Patreon shoutout
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: