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
okposi
NA
2
0
problem creating object of main class
Feb 23 2004 7:36 AM
This problem might look stupid but I have issues with it. I created an aplication in C# //main class Public class Form1 {. . . //display in List box public void showResult(string result) { . mylisbox.add(result) } } I created another class public class GirGen { Form1 theform=new Form1(); theform.showResult("test") } The program will be hanging indefinitely. I am not sure why this happens. But if I create a new class with a display box, it works.Whay can't I create an object of the main class in C#(i.e. the one that contains the "static void Main") I want to put my display box in the main class. I also tried inheriting the main class ie public class DirGen: Form1 { . . mylistbox.add("test") } The program was hanging indefinitely too.Will apreciate your help. I need my lisb box to be in the main class. Thanks OJ
Reply
Answers (
1
)
Passing arrays
endInit() method starting unknown threads. help