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
harry code
NA
124
22.8k
passing method to instance with out creating objeect
Feb 27 2018 1:30 AM
hi,
my code gies like this.
class Testprogram
{
public void callmethod()
{
Console.WriteLine("hello wrotld");
}
static void Main()
{
Testprogram t= new Testprogram();
t.callmethod();
Console.ReadLine();
}
}
now i want to execute with the below code instead of creating object.
static void Main()
{
new Testprogram(callmethod());
Console.ReadLine();
}
Is it possible to do so?.
Thank you.
Reply
Answers (
2
)
how to implement out-proc session in MVC.
stored procedure to retrieve data from radiobutton to table