C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







methods


Posted Date: 13 May 2008      Total Responses: 3

Posted By: beginer       Member Level: Bronze     Points: 1


how to call a method which is written in another class.
i want to call a method written in separate class file from another .cs file.
plz give me answer...





Responses

Author: shakti singh tanwar    13 May 2008Member Level: DiamondRating:     Points: 2
By creating an object of that class.


Author: srilu    13 May 2008Member Level: DiamondRating:     Points: 2
Hi,
Suppose you have a class file name class1.cs and a class class1 in it,in which you write a method add which takes 2 parameters x and y.To call that in your .CS file you have to write

class1 c1=new class1();//createing an object of that class
c1.Add(10,20);


Author: beginer    13 May 2008Member Level: BronzeRating:     Points: 2
thank you srilu


Post Reply
You must Sign In to post a response.
Next : to hide the finished details in C#
Previous : Enter characters in textbox with out spaces causing page width increase
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



Read TATA Nano reviews.
dotNet Slackers   BizTalk Adaptors    Web Design   Scripts
Are you waiting for engineering entrance result? Watch here for engineering entrance results.
doors in nj

Contact Us    Privacy Policy    Terms Of Use