brand new to Oops... question, help please?

J

Jim

Hello...
I have just completed chapters 1-9 of Jessie's Learning
C#. Great tutorial! But, talk about method overloading,
I'm overloaded with OOPs! Can someone offer me some
advise, please?

I have a page of code now with a class named Time and a
Class named Tester per the example in 9-1. I also have a
tab on the top of the Visual Studio code pane named
class1.cs.

My question is: should I, at some point in time, right
click in the Solution Explorer pane and rename Class1.cs
to something else? If so, what? perhaps tester.cs or
time.cs? if so, why one vs. the other? Which one is the
dominant class?

Thanks,
Jim
 
F

Frank Oquendo

Jim said:
My question is: should I, at some point in time, right
click in the Solution Explorer pane and rename Class1.cs
to something else? If so, what? perhaps tester.cs or
time.cs? if so, why one vs. the other? Which one is the
dominant class?

The name of the source is purely an organizational tool and has no
effect upon your program's ability to function. You can choose to use
one file for each class or define several classes in a single file.

In the case of one class to one file, it makes sense to name the file
after the class. When one file contains multiple classes, there's
usually some common thread to those classes so it makes sense to name
the file after that purpose.

For eaxmple, you might consider naming your file TimeUtilities or some
such thing.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top