System class in C#!
Hey guys,
Just playing around with my new book, at's a Noob course in C#.
Here im reading that all classes are defined from the base class defined in the System file.
If i would say like Person P1 = new person();
This actualy is gonna be generated from the base class in the System namespace.
(correct me if im wrong, im just a noob...)
So if i would like to print variable as a string to the screen from another class like : return(BirthDate.ToString("D")); this ToString is actually a method in the base class from System no ?
So my question is how can i open this System file to look what other functions and methods are present and handy to use ?!?
Thanks,
Galo
The base class for all classes is 'object'. ToString is a method of the object class and is available to use in any class defined in C#. You may also overload it in your classes to change it's functionality.
There really isn't a "System" file you can open. System is a namespace that includes alot of different classes. You can browse the System namespace, as well as any other, by opening up the .NET documentation or by going to MSDN.
Oh yea, if you're using Visual Studio.net, go can also open and view all the data in System.dll.
There really isn't a "System" file you can open. System is a namespace that includes alot of different classes. You can browse the System namespace, as well as any other, by opening up the .NET documentation or by going to MSDN.
Oh yea, if you're using Visual Studio.net, go can also open and view all the data in System.dll.
or if you're using a handy IDE like i do (borland C# builder), you can just type in the object name and follow it by a '.' (dot)... wait about a sec or so and a scroll box should appread with all of the properties/members/etc available for that object...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement