In the following code displayed:
using System;
class Booleans
{
public static void Main()
{
bool content = true;
bool noContent = false;
Console.WriteLine("It is {0} that C# Station provides C# programming language content.", content);
Console.WriteLine("The statement above is not {0}.", noContent);
Console.ReadLine();
}
}
Am I correct that the "{0}" will show up when you want to insert a variable and such? I've just started reading up on it today, but I'm not sure why they use "{0}" instead of just calling the variable directly, perhaps its my lack of knowlege with C based material, could anyone elaborate for me please?
Much thanks!
[EDITED] Allright I've been looking at it more, and I'm thinking that the "{0}" will mean that the next parameter that passes is what will be inserted into that spot so like
("The statement above is not {0}.", noContent);
The variable defined as noContent will be inserted into the "{0}" spot.
Did you compile and run it? :)
Yes, but I tend to doublecheck myself too many times. Other then that I'm rather enjoying the C# work, I'm not really advanced yet, still learning the simple functions(arrays, loops) but it's still fun!
Write lots of code, even if just typing in other people's examples. Imagine how you can change it, and guess what it'll do (don't think about it for more than a few seconds though). Make the change, and see what happens. Go "oooh ok that's cool". Repeat.
You're trying to let his childlike enthusiasm run out?
Quote from: Adron on January 07, 2004, 12:00 PM
You're trying to let his childlike enthusiasm run out?
Haha, no, actually I'm trying to encourage use of said enthusiasm to turn into learning technique!
Ah, I see. Let's see which happens. Sitting around saying "cool" doesn't sound like it'd be amusing after a short while ;)
Yeah, me and Crypticflare are learning C# together and it's pretty fun. =]
Quote from: Adron on January 07, 2004, 12:36 PM
Ah, I see. Let's see which happens. Sitting around saying "cool" doesn't sound like it'd be amusing after a short while ;)
He's apparently still saying "cool". :)
Cool.
Actually I've gotten pretty good so far at it, I've just come across a few problems concerning "methods" in my lesson chapter, it doesn't explain a lot about them, so I'm still stumbling around. Besides that, its the most addicting language I've written in for a while.
Quote from: Newby on January 07, 2004, 01:24 PM
Yeah, me and Crypticflare are learning C# together and it's pretty fun. =]
And me!