Re: Need help with craeting a class with a single function in it.
Arent generics only in 2005? Woof is running 2003, right?
Re: Need help with craeting a class with a single function in it.
ahhhh generics, yes I know what they are. But yes, I am using 2003 at the mo on this project. I am using 2005 at home for all furture dev work.
Personally, at this moment in time I prefer creating a collection and sitting it inside a strongly typed class. Black boxing is the way forward ;)
Maybe I am wrong.
Woof
Re: Need help with craeting a class with a single function in it.
Quote:
Originally Posted by RobDog888
Arent generics only in 2005? Woof is running 2003, right?
Yes, he already stated they were only in 2005 (C# 2.0)
Quote:
Originally Posted by Wokawidget
Personally, at this moment in time I prefer creating a collection and sitting it inside a strongly typed class. Black boxing is the way forward ;)
Maybe I am wrong.
The problem with that is lots of casting is needed and it will slow performance. It not be that noticable but generics would be much faster.
Unfortuantely they are not quite as advanced as C++ templates. Hopefully that'll change in C# 3.0
1 Attachment(s)
Re: Need help with craeting a class with a single function in it.
I don't see any problem in your code. Maybe you should add the ToString() method in the Console.WriteLine(miObjeto.Msg()); line.
It should be like this: Console.WriteLine(miObjeto.Msg().ToString());
If the problem persist, you should comment the line // to check if the error happens there, and if is not, try to comment the code in other place until the error dissapear. If that happen, you should check in that point.
Regards,
Tribo.
Re: Need help with craeting a class with a single function in it.
errr. I don't have an erro :confused:
If Msg is a string, then there is no poinbt what so ever in doing .ToString on it...:confused:
Woka
Re: Need help with craeting a class with a single function in it.
But if you can't run the program you've got a big problem. Try to download my solution and if still don't run try to install your VS again (because my solution works in my PC).
If it runs, try to look the difference between your code and my code...
Regards,
Tribo.
Re: Need help with craeting a class with a single function in it.
Eh? Are you posting in the right thread???
WOka
Re: Need help with craeting a class with a single function in it.
Quote:
Originally Posted by Tribo
But if you can't run the program you've got a big problem. Try to download my solution and if still don't run try to install your VS again (because my solution works in my PC).
If it runs, try to look the difference between your code and my code...
Regards,
Tribo.
He doesn't have a problem... lol
Re: Need help with craeting a class with a single function in it.
Quote:
Originally Posted by kasracer
He doesn't have a problem... lol
Perhaps not in the code department but... ;)