Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to send more than one parameter to constructor using initializeData attribute

How to send more than one parameter to constructor using initializeData attribute

Scheduled Pinned Locked Moved C#
questiontutorialannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    s196675m
    wrote on last edited by
    #1

    Hi I have the following code <listeners> <add name="TestTrace" type="MyNameSpace.TestListener, TestListener, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" traceOutputOptions="None" initializeData="MYlog.txt"> </add> </listeners> Whatever value I put in initializeData will be passed to the constructor of the specified listener. My question is, How can I send more that one parameter in the constructor using initializeData. Suppose my second parameter is integer. Thank you

    C 1 Reply Last reply
    0
    • S s196675m

      Hi I have the following code <listeners> <add name="TestTrace" type="MyNameSpace.TestListener, TestListener, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" traceOutputOptions="None" initializeData="MYlog.txt"> </add> </listeners> Whatever value I put in initializeData will be passed to the constructor of the specified listener. My question is, How can I send more that one parameter in the constructor using initializeData. Suppose my second parameter is integer. Thank you

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If only one parameter is allowed, make it an XML string or a struct, or some other way of passing more than one value, in one go.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups