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
I have multiple classes in a Console Application.
I am wrting a test class,
I want to take an instance of this class below:-
public class Collect
public static void EnterDetails()
Console.WriteLine("Please enter a number");
string number1 = Console.ReadLine();
Console.WriteLine("Please enter another number");
string number2 = Console.ReadLine();
********This is the test class
public class Class2
public void RunMain()
public void TestConvert()
Collect col = new Collect();
col. *** I want the EnterDeatils method to appear here
Why --- you have written the code you should know why.
If you meant to say 'how?', well having written the two classes yourself I expect that you would know how to call a member function. I've not tried the code at my end, but if you have any perticular problem with this code you can always wright back.