C# ToString method 💭

  Рет қаралды 29,600

Bro Code

Bro Code

Күн бұрын

Пікірлер: 22
@BroCodez
@BroCodez 3 жыл бұрын
using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { //ToString() = converts an object to its string representation so that it is suitable for display Car car = new Car("Chevy", "Corvette", 2022, "blue"); Console.WriteLine(car.ToString()); Console.ReadKey(); } } class Car { String make; String model; int year; String color; public Car(String make, String model, int year, String color) { this.make = make; this.model = model; this.year = year; this.color = color; } public override string ToString() { return "This is a " + make + " " + model; } } }
@ban_droid
@ban_droid 3 жыл бұрын
This man woke up, and choose C#
@lukhanyokalashe1906
@lukhanyokalashe1906 Жыл бұрын
bro your videos are an amazing help, i would and think other would also appreciate data structure and algorithms in c#
@Cookiebro13
@Cookiebro13 2 жыл бұрын
super simple and understandable! thx a ton :)
@caseyspaulding
@caseyspaulding 2 жыл бұрын
Great
@cabbiechuck
@cabbiechuck Жыл бұрын
I never really understood the ToString method until now!
@StriveforGainz
@StriveforGainz 2 жыл бұрын
Thanks for this video!!!
3 жыл бұрын
Thanks Bro!
@neelkamal7454
@neelkamal7454 10 ай бұрын
ToString() method is defined in base class which is System.Object , System.Object is the ultimate base class for all C# classes.
@spartanranger
@spartanranger 3 жыл бұрын
Thanks for the video Bro.
@triton5457
@triton5457 2 жыл бұрын
thx for the vid bro
@MrOmar717
@MrOmar717 Жыл бұрын
you love corvette very much 😂😂😂😂😂
@qacayjabrayilov47
@qacayjabrayilov47 2 ай бұрын
wubba lubba dub dub!
@the_dude_josh
@the_dude_josh Жыл бұрын
So what exactly is the point of using the ToString() method? like when would I ever use it?
@whitedinamo
@whitedinamo 3 жыл бұрын
lesson check😊
@definitelynotchris4776
@definitelynotchris4776 4 ай бұрын
override
@andrasfejes8988
@andrasfejes8988 Жыл бұрын
So there is NO auto generated toStrig() method (with ALL fields), like in JAVA?
@the_dude_josh
@the_dude_josh Жыл бұрын
A random comment down below.
@xoomzera2830
@xoomzera2830 2 жыл бұрын
but we didnt create virtual tostring wtf
@sametaslantas4092
@sametaslantas4092 2 жыл бұрын
because There is already ToString method in c#
@xoomzera2830
@xoomzera2830 2 жыл бұрын
@@sametaslantas4092 hehe too late i had to find it alone took me 2 days lmao
C# polymorphism 🎭
5:11
Bro Code
Рет қаралды 92 М.
Java toString method 🎉
6:39
Bro Code
Рет қаралды 108 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
C# methods 📞
6:05
Bro Code
Рет қаралды 67 М.
9.8 ToString() Method - Learning C#
7:10
ParametricCamp
Рет қаралды 10 М.
C# constructors 👷
5:44
Bro Code
Рет қаралды 93 М.
Enums Explained In Under 12 Minutes In Python
12:03
Indently
Рет қаралды 36 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 199 М.
C# generics ⁉️
5:33
Bro Code
Рет қаралды 84 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 999 М.
Every single feature of C# in 10 minutes
9:50
Train To Code
Рет қаралды 174 М.
C# objects 🧍‍♂️
5:01
Bro Code
Рет қаралды 56 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН