c# - The operand '+' can't be applied to operands of type string and method group -


i have problem in query code

 string reqsql = " update client set codclt = " + myclient._codclt      + ",nomclt = '" + myclient._nomclt      + "', prenclt =' " + myclient._prenclt      + " ' ,adressclt =' " + myclient._adressclt      + " ',numcin= " + myclient._numcin      + " ,datdelivcin = '" + myclient._datdelivcin     + "' , datnaiss = '" + myclient._datnaiss      + "',lieunaiss = '" + myclient._lieunaiss      + "',myclient.etatciv = '" + myclient._etatciv      + "',myclient.profclt = '" + myclient._profclt      + "',myclient.numtelclt = '" + myclient.numtelclt      + "'   (codclt=" + myclient._codclt + ")"; 

i error

the operand '+' can't applied operands of type string , method group 

myclient object.

you forgot write () after method name.

if had guess, i'd myclient.numtelclt method. use myclient.numtelclt() instead.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -