Friday, July 31, 2009

Trying to learn C# on my own.?

I am trying to learn C# on my own. I am in a self-paced development program. When I have questions their isn't anyone to go and ask for answers. I have visited a few websites that have helped when searching for answers. Does anyone know of any friendly blogs, or really good sites that gives good examples. I am fairly new to this, I had Basic many,many years ago. Some things in C# just confuse me. I understand Loops, types, simple concepts. It's the way to get from Main to other methods, and to the constructors. OK I might be looking for C# for Dummies. It's like I have hit a wall and the rest dosn't make sense how the code flows. HELP!

Trying to learn C# on my own.?
Those are both great references above. as far as coding you should be able to call any method in the same class as your main easy enough.





private string _something;





public string Something{


get { return _something; }


set { _something = value; ]


}





public void setSomething(string pVal){


Something = pVal;


}





public string getSomething(){


return Something;


}





public static void main(...){


setSomething("This is the value of something");


console.write(getSomething());


}





this is all in the same class





if you need to get a method from another class, let's use the same example above except all methods except the main are in a class called DoSomething





in your main do this...








DoSomething ds = new DoSomething();


ds.setSomething("set something here");


console.write(ds.getSomething());





this is basic stuff, some syntex may be a bit off, just taking from memory.





Hope that helped!
Reply:Check this C# corners


http://www.c-sharpcorner.com
Reply:go to microsoft's msdn website. they have all the documentation and examples for c#. you can also go here and take some tutorials video based)


http://msdn2.microsoft.com/en-us/vcsharp...


No comments:

Post a Comment