Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2006, 03:21 PM
Registered User
 
Join Date: Jun 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is it possible?

Just wondring if it's possible to call a method from one class to another in a class library project? If so can you give ma an example of the syntax?

 
Old July 2nd, 2006, 01:38 PM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It should be direct and should be same as any other project. Suppose you have a class named ClsX and ClsY in the class library project.

Consider you want to call a method of ClsX from ClsY, in the particular method from where you want to call use the following code

ClsX obj = new ClsX();
obj.method();



It is not how much we do,
but how much love we put in the doing.

-Mother Theresa









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.