using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { // type casting = Converting a value to a different data type // Useful when we accept user input (string) // Different data types can do different things double a = 3.14; int b = Convert.ToInt32(a); int c = 123; double d = Convert.ToDouble(c); int e = 321; String f = Convert.ToString(e); String g = "$"; char h = Convert.ToChar(g); String i = "true"; bool j = Convert.ToBoolean(i); Console.WriteLine(b.GetType()); Console.WriteLine(d.GetType()); Console.WriteLine(f.GetType()); Console.WriteLine(h.GetType()); Console.WriteLine(j.GetType()); Console.ReadKey(); } } }
@vagifgafar29462 жыл бұрын
Convert.ToInt32() - is not truncating, but rounding
@MTP2nd10 ай бұрын
@@vagifgafar2946 then use Convert.ToInt32(Decimal.Round(value, 0, MidpointRounding.ToZero)); since Visual Studio 2022 }
@Cricketstatusyt2 жыл бұрын
I Learned C# From your channel got a job in Fullstack web developer at Cognizant. Thank you Bro😍😍
@elliotradley43702 жыл бұрын
I have been recommending this channel too so many people in my classes, they all love the content, keep up the great content
@NexxtMeme Жыл бұрын
Bro i absolutely love how clear and clean your method of teaching is 🙏
@excaliburst0054 Жыл бұрын
One best tutor around here in youtube, i watched your java form video, please can you make wpf c# tutorial as well.
@scriptles7 ай бұрын
So I am a C++ programmer that still uses a little C. My work gave me an offer to go help out another department. My department sorts mail, and the other department does full stack development. They use C# and I have been dragging my feet for years to learn it. Now that I actually am going to be a step closer to my dream I am taking it serious now to learn c#.
@sangitakumari54822 жыл бұрын
Nice video 👍👍😊
@v4t0z3 жыл бұрын
Nice video
@urreallysus2 жыл бұрын
best tutorial channel
@Myotiss226 ай бұрын
Thank you for simplicity
@maxzzzie2 жыл бұрын
This dude. Is a legend.
@codingdisciple3765 Жыл бұрын
Preciate the video fam🤗
@WickedJackThe1 Жыл бұрын
Is it bad practice using only the keywords, for primitive datatypes, to cast? double pi = 3.14; int a = (int)pi;
@WickedJackThe1 Жыл бұрын
But string is not a primitive Datatype.
@antefavour13272 жыл бұрын
Thank you a lot,I really gained well
@Garrettwest20253 жыл бұрын
You have any projects for c#?
@spartanranger3 жыл бұрын
Thanks for the video Bro
@lampywicks Жыл бұрын
I haven't watched the video yet, but I heard that "Oh yeah", scrolled down and saw the channel avatar and name, immediately hit that subscribe button. It became clear to me at this moment, this is no ordinary channel, this is a man's channel. This is the kind of channel you go to when your masculinity is overpowering you and needs to be released through pure unadulterated logic. I already know that by watching your videos, my brain is going to be forming new connections that function as if they were created through the use of organic steroids formulated from the biological specimens of subjects that would make Arnold Schwarzenegger and Randy Savage weep tears of estrogen and pass winds of talcum powder and floral scented air sanitizer. This might sound a bit like a joke, but that's just how I put my thoughts into words. My mind and body is ready. I'll watch the video now.
@pumpkinpigamingtechnoblade7902 Жыл бұрын
What
@sandarubandara443711 ай бұрын
Thank you
@simik48302 ай бұрын
comment for algorithm!!!
3 жыл бұрын
Thanks!
@ericsebhig6643 жыл бұрын
If the user input consist of numbers and sentences, do you have to convert it into a string ?
@gillnabiel83853 жыл бұрын
Yeah (I believe )
@irfanhakim46173 жыл бұрын
yup..
@ZeeWolfed2 жыл бұрын
thanks
@K4vin6010 ай бұрын
droppin a comment for that algorithm!
@Onyvox2 жыл бұрын
Bool is Cool
@whitedinamo2 жыл бұрын
lesson check😇
@Trashcan-Memes Жыл бұрын
didnt you first use VS code now this like is this a mandela effect