XML : Returned variable does not exist in C#

I have a dataTable "A" defined in a function called ParseByXML(). but the returned "A" cannot be used by another independent function ParseByLinq(). Is there any solution to avoid "does not exist in the current context"?

  namespace XmlParsers.Models  {    public static class XMLParsers    {      public static DataTable ParseByXML()      {        var A = new DataTable();        ...        return A;      }        public static DataTable ParseByLinq()      {        var B = from row in A                 ...        return B;      }    }  }      

No comments:

Post a Comment