Windows Phone Developers

Sunday, August 24, 2008

The best overloaded Add method 'name for the collection initializer has some invalid arguments in ‘ToString’

The type of one argument in a method does not match the type that was passed when the class was instantiated.

The best overloaded method match for 'System.Windows.Forms.MessageBox.Show(string)' has some invalid arguments

Solution : One possible solution is to check if the ‘ToString’ has braces

System.Text.StringBuilder CompleteAddress1 = new

System.Text.StringBuilder();

CompleteAddress1.Append( "105, Annanagar ");

CompleteAddress1.Append( "Chennai ");

CompleteAddress1.Append( "Tamil Nadu ");

‘ Error Line

MessageBox.Show(CompleteAddress1.ToString );

Solution

MessageBox.Show(CompleteAddress1.ToString() );

Argument '1': cannot convert from 'method group' to 'string'




The best overloaded Add method 'name for the collection initializer has some invalid arguments in ‘ToString’ Error
Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

1 comment:

  1. http://stackoverflow.com/questions/396281/new-c-sharp-programmer-adding-two-numericupdown-values-together

    ReplyDelete