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
suganthie_s
NA
1
0
Assign to the current object "this"
Jan 18 2005 12:04 PM
Hi, I am trying to assign to the current object in my code as follows. public class Stack { public void push() { } public void pop() { } public void reverse() { object x; ArrayStack t = new ArrayStack(5); while(this.depth != 0) { this.pop(out x); t.push(x); } swap(ref t); } public void swap(ref Stack s) { Stack temp = s; s = this; this = temp; --> Compile error on this line stating "this is a readonly variable" } } Is there a workaround for this error? Thanks!
Reply
Answers (
0
)
How to Cache in WebService
Image Coloum in Datagrid