Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2006, 02:48 PM
Registered User
 
Join Date: Sep 2006
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#?





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 08:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.