Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
any one tell me "how to use data member outside of the scope"

suppose i have declared datatable as a member. i want to use this member outside of its scope
Posted
Comments
Sergey Alexandrovich Kryukov 2-Jul-14 1:29am    
Not clear. It depends on what do you mean by "use". By the way, why?
Even "suppose I have declared database as a member" is not clear. Member of what type?
How about small code sample?
—SA
Rahul VB 2-Jul-14 14:57pm    
Thats precisely what i wanted to ask him.
George Jonsson 2-Jul-14 1:41am    
By declaring a DataTable as a member, do you mean as a member of a class?
Rahul VB 2-Jul-14 14:56pm    
Please elaborate the meaning of scope. I can infer many things from what you just said:
1) declare the type outside, make it public or whatever, instantiate it within a method. This will make it accesible and it suffices what you just said.

2) Declare and instantiate outside the method(obviously in a class) and refer it by using access modifiers.

Only these 2 things make sense as per what i feel.

Now what do you feel?

1 solution

Hello

Your query is not clear. Can you please explain more with sample code.
 
Share this answer
 
Comments
George Jonsson 2-Jul-14 1:43am    
This is not a solution, but a comment.
It should be removed so the question is unanswered.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900