Shawn,
It only needs to be public if you need it outside of your class (in this case, outside of your form). If not, then either private or protected is fine.
And, if it *does* need to be public, it doesn't necessarily need to be a property (with a get/set), although that's probably better (in case you want to be able to set it via the property sheet, or in case you need to have extra code in the get/set).
~~Bonnie
>Okay, i don't get it?
>
>Why would i have a public property called
>CurrentDataGridHitRow and a private _currentDataGridHitRow
>
>Wouldn't it be easier to use a protected var versus a property.
>
>Maybe my designis bad, and it needs a proteted var versus a property.
>
>I was using the property to hold the DataRow, so i can access it from any where in the winform or pass it as a datarow somewhere else.
>
>Would a Var be better????
>
>
>
>
>
>>Hi Shawn:
>>
>>You have a recursive property. Try this:
>>
>>
>>private DataRow _currentDataGridRow
>>public DataRow CurrentDataGridHitRow
>>{
>> get{return this._currentDataGridRow;}
>> set{this._currentDataGridRow = value;}
>>}
>>
>>
>>HTH,
>>
>>--Paul