Hallo, ich habe eine Funktion von VB nach C#
�bersetzt und bekomme nun den Fehler:
'System.Web.Caching.Cache' enth�lt keine Definition f�r 'Item'
Was ist in VB "richtiger"?
Matthias


Public Shared Function GetList() As ArrayList
Dim Context As HttpContext = HttpContext.Current
If Not IsNothing(Context) AndAlso _
 Not IsNothing(Context.Cache.Item("Data")) Then
  If TypeOf (Context.Cache.Item("Data")) Is ArrayList Then
   Return Context.Cache.Item("Data")
  End If
End If
Return Load()
End Function


public ArrayList GetList()
{
 HttpContext Context = HttpContext.Current;
 if((Context != null) && (Context.Cache.Item("Data") != null))
 {
  if (TypeOf(Context.Cache.Item("Data")) == ArrayList)
  {
   return Context.Cache.Item("Data");
  }
 }
}




_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an