Categories
C#.NET Microsoft Visual Studio

Visual Studio C#.Net – “A get or set accessor expected”

A get or set accessor expected

in Italian:

È prevista una funzione di accesso get o set

Solution:
You miss the parentheses on the method declaration

private void SampleMethod()
{

}

Did my solution solve your problem? Leave a reply.

Categories
C#.NET Microsoft Visual Studio

Visual Studio C#.Net – “Cannot convert method group ‘ToString’ to non-delegate type ‘string’. Did you intend to invoke the method?”

Cannot convert method group ‘ToString’ to non-delegate type ‘string’. Did you intend to invoke the method?

in Italian:

Impossibile convertire il gruppo di metodi ‘ToString’ nel tipo non delegato ‘string’. Si desiderava richiamare il metodo?

Solution:
You miss the parentheses: ToString()

Did my solution solve your problem?