c# - How to dynamically add a label in a tab control -


i have class called gamesconsole , 2 forms - form2 , form3.

in form2, create instance of gamesconsole named invoice. after have added values inside of invoice list, pass form3 can reference there.

so far, in form3 create object of gamesconsole called invoicerental:

// build object of gamesconsole on form3 gamesconsole invoicerental = new gamesconsole()  //build function return value of invoicerental public gamesconsole getinvoice {     { return invoicerental; }     set { invoicerental = value; } } 

and on form2, right after create instance of form3, attempt call function getinvoice on form3 set equal invoice in form2. however, won't let me.

would tell me how pass object form? i've been using above function data type (int, string, double...) , it's working fine, except time.

change gamesconsole class public class.

your getinvoice property defined public , holds reference gamesconsole instance.

thus, gamesconsole class should public too, otherwise how access properties of gamesconsole instance using getinvoice property ?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -