Rückgabe anonymer Typ in C#C#

Ein Treffpunkt für C#-Programmierer
Anonymous
 Rückgabe anonymer Typ in C#

Post by Anonymous »

Ich habe eine Abfrage, die einen anonymen Typ zurückgibt, und die Abfrage befindet sich in einer Methode. Wie schreibt man das: < /p>

Code: Select all

public "TheAnonymousType" TheMethod(SomeParameter)
{
using (MyDC TheDC = new MyDC())
{
var TheQueryFromDB = (....
select new { SomeVariable = ....,
AnotherVariable = ....}
).ToList();

return "TheAnonymousType";
}
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post
  • Servicestack V.8.6 Anonymer Typ
    by Guest » » in C#
    0 Replies
    14 Views
    Last post by Guest
  • Methoden anonymer Klassen in Java
    by Anonymous » » in Java
    0 Replies
    5 Views
    Last post by Anonymous
  • Spring @Bean Annotation und anonymer Objekt in Java
    by Anonymous » » in Java
    0 Replies
    7 Views
    Last post by Anonymous
  • Automatische Löschung anonymer Firebase -Konten
    by Anonymous » » in Android
    0 Replies
    4 Views
    Last post by Anonymous
  • MyPy meldet Parameter, dessen Typ ein typarer Typ ist, der an denselben Typ wie der Standardwert gebunden ist
    by Anonymous » » in Python
    0 Replies
    30 Views
    Last post by Anonymous