Windows Phone Developers

Sunday, August 24, 2008

Argument '1': cannot convert from 'System.Text.StringBuilder' to 'string'

Use ‘ToString’ to convert the StringBuilder to String

// Appending String - using String Builder

System.Text.StringBuilder CompleteAddress1 = new

System.Text.StringBuilder();

CompleteAddress1.Append( "105, Annanagar ");

CompleteAddress1.Append( "Chennai ");

CompleteAddress1.Append( "Tamil Nadu ");

// Error Code

//MessageBox.Show(CompleteAddress1);

// corrected Code

MessageBox.Show(CompleteAddress1.ToString() );



Argument '1': cannot convert from 'System.Text.StringBuilder' to 'string' 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

No comments:

Post a Comment