Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Circular Dependancy

$
0
0

I have two projects A & B , I have already given Reference Of B in A. But Now I want to give reference of A in B so that I can call the methods from A in B. But While Adding Reference I am getting following error

 --------------------------- Microsoft Visual Studio ---------------------------

 A reference to 'A' could not be added. Adding this project as a reference would cause a circular dependency.

 --------------------------- OK ---------------------------

Project A:

Public static Class A

{

      public string GetResourceMessage(string res)

         {

              // some code here ....

         }

 }

 

Project B:

 

public Class B

   {

      Public void TestResource(string res)

          {

                **** I want to call here method "GetResourceMessage" which is in Project A's class A ***

              e.g.

           A.GetResourceMessage(res);

          }

 }

Please give me solution on this...

Thanks in advance...


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>