<object>.Execute method in C#

  • Thread starter Thread starter ewingate
  • Start date Start date
E

ewingate

While translating some VB code to C# (both .NET 2.0) I ran across the
following line of code:

sResult = m_oMaintain.Execute( sCommand );

sResult and sCommand are both strings and m_oMaintain is an object. The
code is not compiling in C# because C#, it seems, does not have a
definition for Execute whereas VB does. After doing some research I
added both a reference and a using statement for Microsoft.Build.Tasks.
This had no effect. Is there a reason why VB objects have a definition
for Execute and C# objects do not? Is there an equivalent in C# to the
Execute method?

Thank You!

-Erick
 
Hi Erick,

There is a comment in the help that this is a framework method and is
not intended to be called fom your code. Could you give some more
information as to what the code segment is supposed to do

Nick
 
Back
Top