c# - Adding Textbox and MessageBox to a class library -
c# - Adding Textbox and MessageBox to a class library -
i'm trying create dll existing project. existing project application calculates involvement rates , windows form.
the code i've been given create dll includes references textbox , messagebox.
here's sample method in code:
public static bool ispresent(textbox textbox) { if (textbox.text == "") { messagebox.show(textbox.tag + " required field.", title); textbox.focus(); homecoming false; } homecoming true; }
i've never created class library/dll before, followed the instructions here.
when build solution (for class library), error:
error 1 type or namespace name 'textbox' not found (are missing using directive or assembly reference?) j:\loanapplication\validatorsolution\validatorsolution\class1.cs 24 38 validatorsolution
and it; understand error saying. problem don't know how around it.
any advice?
you need reference system.windows.forms(use this guide) , include using statement
using system.windows.forms;
for each external type you're using in library, need help vs determine , 1 mean.
c# visual-studio-2010
Comments
Post a Comment