Please tell me how to call a (.cs) file in c# application.ple ase provide me with an example.as i am trying to import that class file but i don 't know how to call it in my code behind file.please help me.
how to refer or call a class file in c# application
Collapse
X
-
Originally posted by rojiinPlease tell me how to call a (.cs) file in c# application.ple ase provide me with an example.as i am trying to import that class file but i don 't know how to call it in my code behind file.please help me.
[CODE=vbnet] ' Suppose your class name is clsCustomer
Dim ObjclsCustomer As New clsCustomer
'now call a method like this
ObjclsCustomer. GetCustomerDeta il()
[/CODE] -
Originally posted by rojiinPlease tell me how to call a (.cs) file in c# application.ple ase provide me with an example.as i am trying to import that class file but i don 't know how to call it in my code behind file.please help me.
Let us suppose that u create UtilityInfo.cs and add it to app Code folder
Step2.
At ur Page load event Create the instance of ur .cs file as
UtilityInfo utf =new UtilityInfo();
Step 3.
If u want to call any function from that cs file u just to write
utf.functionnam e(function parameter)
End
U have done it ,any prom shoot me a replyComment
Comment