c# - Compiler error reads "end of file expected" -



c# - Compiler error reads "end of file expected" -

the lastly 2 curly brackets on code underlined error reads:

type or namespace definition, or end-of-file expected.

i think curly brackets somehow uneven or mismatched somewhere. have looked through them , cannot seem find off.

public partial class add_customer : form { public client newcustomer { get; set; } public add_customer() { initializecomponent(); } private void btn_submit_click(object sender, eventargs e) { validateform(); } private bool validateform(); { if (string.isnullorwhitespace(txtfirstname.text)) { messagebox.show("first name required"); homecoming false; } } } }

this error means have mismatched parenthesis or brackets. in case have } in method:

private bool validateform(); { // 1 if (string.isnullorwhitespace(txtfirstname.text)) { // 2 messagebox.show("first name required"); homecoming false; } // 2 } // <-- extra! } //1

c# syntax-error

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -