473,378 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Overriding Object::ToString()

Hi,

why I can not override it?

This line: virtual String^ ToString() override = Object::ToString;
produces this error: cannot override base class method
'System::Object::ToString'.

Why is that?

Here is the code:
http://eugeneciurana.com/pastebin/pa....php?show=5225

Thanks in advance,
Etam.

Nov 11 '07 #1
2 5424
On 2007-11-11 16:50:05 -0500, Etam <od*******@gmail.comsaid:
>
why I can not override it?

This line: virtual String^ ToString() override = Object::ToString;
produces this error: cannot override base class method
'System::Object::ToString'.

Why is that?
That's not C++. Try a newsgroup that discusses C#.

--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(www.petebecker.com/tr1book)

Nov 11 '07 #2
Etam wrote:
Hi,

why I can not override it?

This line: virtual String^ ToString() override = Object::ToString;
produces this error: cannot override base class method
'System::Object::ToString'.

Why is that?

Here is the code:
http://eugeneciurana.com/pastebin/pa....php?show=5225
C++/CLI is off topic here. Ask in a .NET newsgroup.
Nov 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Neil | last post by:
Is it possible to override the ToString() method when creating a simple enumeration? public enum myEnum { Undefined = 0, Unassigned = 1, Assigned ...
4
by: avivgur | last post by:
Hi, Suppose I have an enum declared as: enum Color {Red, DarkRed, Blue, DarkBlue} Color c = Color.DarkBlue; And I want the command "Console.WriteLine(c);" to print out "Dark Blue" instead of...
6
by: Joe | last post by:
Stupid question, but I'm really stuck I have a class that overrides ToString(). When this class is cast back to Object, and ToString() called, Object.ToString() is called instead. I've tried...
2
by: ECathell | last post by:
I am having issues with my collection now that i have it mostly together. I am binding it to a listbox, but instead of the box information I want it to show, it is simply showing the object type. I...
0
by: ºa¤Ö | last post by:
Dear All Experts I would like to know what's the different between Convert.ToString(object) object.ToString() (string)object ?? thanks
11
by: etam | last post by:
Hi, why I can not override it? This line: virtual String^ ToString() override = Object::ToString; produces this error: cannot override base class method 'System::Object::ToString'. Why is...
0
by: Vic | last post by:
A datagridview is populeted by a List(of cInfo) The Datagridview Columns are bound to properties of cInfo. Some of the properties are object types (for example cByteInfo) and for that the cByteInfo...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.