Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Question about static object
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Prakash Tripathi
9y
476
1
Reply
hi guys,
I have a question, I have seen variable declaration like below and wondering why/how it's working. I was expecting an error and both new and static keywords are used together.
static
Class1 obj = new Class1();
obj.SomeMethod();
Any idea why it's working and not giving any error?
Thanks,
Prakash
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to move items between ListBoxes in ASP.NET
oop interview question