Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old September 7th, 2006, 02:48 PM
Registered User
Join Date: Sep 2006
Location: Chicago, IL, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# property with parameters

Is there anyway to pass a parameter to a property in C# like you would in vb.net

I have some old VB code that wraps an XPath search to "touch" the path and then set or return the value. So you can have an xml object with just "<ROOT_NODE />" and call:

xmlObject.E("ROOT_NODE/CHILD/VALUE") = "1"

The above would create the "CHILD" node and the "VALUE" node and give the "VALUE" node a text of "1". The XPath is passed as a parameter of the property. So now I need to see if I can make a backwards compatible version in C#. I have the "touch" logic working I just do not know how to make the syntax work the same.

Does anyone know how to do this in C#?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameterized Property surendraparashar C# 2005 4 October 17th, 2007 11:33 PM
property umeshtheone Beginning VB 6 2 May 18th, 2007 12:37 AM
How To Get Browser Property shek_lko PHP How-To 2 May 21st, 2006 10:59 PM
TopMost Property shadowpug VB.NET 2002/2003 Basics 0 September 27th, 2004 09:53 AM
Allow ByPassKey property bjackman Access 2 January 3rd, 2004 07:39 PM

All times are GMT -4. The time now is 04:16 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.