Can someone help.
I have vB.net and need to convert it to C #. At first it was pretty simple, but I need to pass in the NamedObject variable as welll, which is supported in vb.net but not in C # ..
What are my options.
Here is vb.net - pay attention to NamedObject
Public Property Datos(ByVal NamedObject As String) As T Get Return CType(HttpContext.Current.Session.Item(NamedObject ), T) End Get Set(ByVal Value As T) HttpContext.Current.Session.Item(NamedObject ) = Value End Set End Property
and this is C #, but these are errors, since it appears, I can not pass the parameter in the property
public T Datos(string NamedObject) { get { return (T)HttpContext.Current.Session[NamedObject]; } set { HttpContext.Current.Session[NamedObject] = Value; } }
I would be grateful for any input.
thanks
source share