Method name or event expected
From Logic Wiki
D code = new D(x.ToString());
remove the parenthesis at the end
D code = new D(x.ToString);
D code = new D(x.ToString());
remove the parenthesis at the end
D code = new D(x.ToString);