Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Paul Ruane is correct, I have just tried myself building the project. I just made a whole SLN to test if it worked.</p> <p>I made this in VC# VS2008</p> <p>&lt;&lt; ( Just helping other people that read this aswell with () comments ) </p> <p>Step1:</p> <p>Make solution called DoubleProject</p> <p>Step2:</p> <p>Make Project in solution named DoubleProjectTwo (to do this select the solution file, right click --> Add --> New Project)</p> <p>I now have two project in the same solution</p> <p>Step3:</p> <p>As Paul Ruane stated. go to references in the solution explorer (if closed it's in the view tab of the compiler). DoubleProjectTwo is the one needing functions/methods of DoubleProject so in DoubleProjectTwo right mouse reference there --> Add --> Projects --> DoubleProject.</p> <p>Step4:</p> <blockquote> <p>Include the directive for the namespace:</p> </blockquote> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using DoubleProject; &lt;------------------------------------------ namespace DoubleProjectTwo { class ClassB { public string textB = "I am in Class B Project Two"; ClassA classA = new ClassA(); public void read() { textB = classA.read(); } } } </code></pre> <p>Step5:</p> <blockquote> <p>Make something show me proof of results:</p> </blockquote> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DoubleProject { public class ClassA //&lt;---------- PUBLIC class { private const string textA = "I am in Class A Project One"; public string read() { return textA; } } } </code></pre> <blockquote> <p>The main</p> </blockquote> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using DoubleProjectTwo; //&lt;----- to use ClassB in the main namespace DoubleProject { class Program { static void Main(string[] args) { ClassB foo = new ClassB(); Console.WriteLine(foo.textB); Console.ReadLine(); } } } </code></pre> <p>That SHOULD do the trick</p> <p>Hope this helps</p> <p>EDIT::: whoops forgot the method call to actually change the string , don't do the same :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload