474,052 Members | 40,221 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ToString() does not exist ... anywhere !

In .NET v1.1.4322 , in a VS.NET application , has anyone ever run into the
bizarre situation where at runtime .NET believes that the ToString() method
does not exist ...

Sometimes this problem will show up as a runtime exceptions, sometimes this
problem will only be clear via QuickWatch in Debug mode

But the error message is always identical :

"error: '{object name}.ToString' does not exist:"

It could be

System.Data.Sql Connection.SqlC lient.State.ToS tring()

or it could be

Application["key name"].ToString()

or a variety of other uses of the ToString() method ...

I've tried rebuilding , restarting the machine ... but the problem
continues.

This is the strangest behavior I have ever encountered

Jun 15 '06
25 2259
D W <gu******@hotma il.comwrote:
I replied to this a while ago, but don't see it here now.

To reiterate:

I was having other runtime issues not involving this one, so I can't say
that it was strictly a debugger issue...though I believe that it was.

Here's what I did instead that worked:

string Company = System.Convert. ToString(newCom pany);
string Year = System.Convert. ToString(Reques tYear);

cmd.Parameters. Add("@DestDB", System.String.C oncat(Company + Year));
There's really no reason that should work but the "normal" way
wouldn't. I strongly suspect it was just a debugger issue.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 28 '07 #21
D W
Sorry about that.

I never specified that I wanted to email you. Hopefully, you don't get
this one too.

I didn't see anything in the FAQ about it either. Did I miss something?


*** Sent via Developersdex http://www.developersdex.com ***
Sep 28 '07 #22
D W <gu******@hotma il.comwrote:
Sorry about that.

I never specified that I wanted to email you. Hopefully, you don't get
this one too.
Um, these aren't emails, but newsgroup posts.
I didn't see anything in the FAQ about it either. Did I miss something?
Anything in the FAQ about what in particular?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 28 '07 #23
D W saw your signature block and thought it was part of your answer.
Actually, both are great and keep it up!

"Jon Skeet [C# MVP]" wrote:
D W <gu******@hotma il.comwrote:
Sorry about that.

I never specified that I wanted to email you. Hopefully, you don't get
this one too.

Um, these aren't emails, but newsgroup posts.
I didn't see anything in the FAQ about it either. Did I miss something?

Anything in the FAQ about what in particular?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 29 '07 #24
D W
Funny. I looked for that signature in his previous posts, but it didn't
appear...so I thought I was being reprimanded for something I didn't do.
This thread appears in a few places, and I didn't know if the site I was
using was sending emails I didn't know about.

Oh well, thanks for the input anyway.

*** Sent via Developersdex http://www.developersdex.com ***
Oct 1 '07 #25
On Oct 1, 2:45 pm, D W <gusar...@hotma il.comwrote:
Funny. I looked for that signature in his previous posts, but it didn't
appear...so I thought I was being reprimanded for something I didn't do.
This thread appears in a few places, and I didn't know if the site I was
using was sending emails I didn't know about.
Ah, no - if I'm posting via Google Groups (as I am now) I don't get a
sig. When I post using Gravity, from home, I use that as a standard
signature.

No reprimand intended :)

Jon

Oct 1 '07 #26

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

Similar topics

3
1192
by: rc | last post by:
is there anyway of creating a class so that when it is used as the object directly it does the toSting implementation ie public class recordID private mid as string public overloads function Tostring as string retrun mid end function end class so if i was using recorid anywhere then i dont get unable to convert to
2
1764
by: qazmlp | last post by:
I have a class containing 5-6 member data. I want to provide a toString() method as a part of this class to help the users to do tracing. const std::string& toString() { std::string objectData ; objectData = "memberData1=" + memberData1 ; objectData += " memberData2=" + memberData2 ; objectData += " memberData3=" + memberData3 ; objectData += " memberData4=" + memberData4 ;
1
2153
by: Bakunin | last post by:
Hi, I may be doing something dumb but.......I have been using the data access ent lib to do the HOL's. All is well. However I now want to add the data access functionality to my BTS2004 project, therefore requiring strong name key. When I try to compile the Data solution from source I get Namespace "Configuration" does not exist in Microsoft.practices.EnterpriseLibrary.Data are you missing..... The problem is that I am not. I can't...
101
19340
by: Sean | last post by:
Book I am reading says that Cstr() is best method for efficency and safety however it doesnt compare that method of the .ToString() method. Which is best. Thanks
7
3955
by: axkixx | last post by:
For whatever reason, I keep getting error of int.ToString() not existing. Why not? Has anyone encountered this problem before?
31
6214
by: Zytan | last post by:
Everything (er, every class) in C# has ToString() which is conveniently automatically invoked when using it in Debug.WriteLine() or in a string concatenation, etc. I made a struct, and I want to make a method to print out its data in a similar format. So, I did this: public struct MyStruct { public override string ToString() {
19
4232
by: Angus | last post by:
I have a socket class CTestClientSocket which I am using to simulate load testing. I create multiple instances of the client like this: for (int i = 0; i < 5; i++) { CTestClientSocket* pTemp = new CTestClientSocket(this, ip, port); pTemp->Connect(); m_collClients.push_back(pTemp);
11
441
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 that?
19
2753
by: Michael C | last post by:
If we have something like this object x = null; MessageBox.Show(x.ToString()) we get an error. That kindof makes sense but there is no reason the behaviour couldn't be to return an empty string. When we call x.ToString we are really calling a function like this: class Object
0
10564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
12179
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
12065
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10346
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8728
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5439
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4954
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.