TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Miodrag
NA
5
0
Constructor question, reference problem
Sep 18 2008 5:52 AM
Hello I have two questions. 1. Is it possible to call base constructor in the body of the current constructor? I want code like this: class MyClass { public MyClass() { // some code here base(); } } 2. I don't understand this code. I have an object that returns reference to the DataTable it contains. I am wondering how come that in following code t variable remains valid: void MyClass() { DataTable t; void SomeFunc(){ using ( ObjectWithTable owt = new ObjectWithTable() ) { t = owt.Table; } } } The GC will free the owt as soon as it exits the using statement, but I can still access its table over t. Thanks.
Reply
Answers (
4
)
Image Path is not showing image in CS in asp.net c#
Exporting Selected Range Of pages from crystal reports