declaring path in c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shadows206
    New Member
    • Nov 2007
    • 5

    declaring path in c#

    I wanted to declare path as string and send the path to database
    string skillIDpath = "\Package\Inact iveSkillAgentsC leanUp.Variable s[PackageConfigur ation::SkillID].Properties[Value]";

    but i can't do this.any suggestion?
  • mac11
    Contributor
    • Apr 2007
    • 256

    #2
    Originally posted by shadows206
    I wanted to declare path as string and send the path to database
    string skillIDpath = "\Package\Inact iveSkillAgentsC leanUp.Variable s[PackageConfigur ation::SkillID].Properties[Value]";

    but i can't do this.any suggestion?
    <discplaimer: I have no experience with c# but assume it is similar enough to c++ that I can be of help>

    Things inside quotes don't get evaluated so you have to pack your string in steps using string class methods.

    So, first put on the "\Package\Inact iveSkillAgentsC leanUp.Variable s", then use a string method to put on the value of [PackageConfigur ation::SkillID], proceed like that.

    You might have to convert datatypes depending on what SkillID and Value are, and it might be useful for you to look into stringstreams (or whatever the c# equivalent is) .

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      I am moving this to the .NET forum.

      Comment

      Working...