Autor Beitrag
Baumunk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

WinXP
Delphi 2005
BeitragVerfasst: Di 28.11.06 14:57 
Hallo,

nächste frage:

ich habe so eine Function :

ausblenden C#-Quelltext
1:
2:
3:
public static void DrawGradient(Graphics AGraphics, Rectangle Rect,
            Boolean Horizontal, Color[] Colors)
        {


Wie soll diese function aufrunen, genau gesagt wie übergebe ich Color array, ohne ihn separet zu deklarieren?
Robert_G
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416


Delphi32 (D2005 PE); Chrome/C# (VS2003 E/A, VS2005)
BeitragVerfasst: Di 28.11.06 15:21 
Arrays sind einfach Arrays, die Eigenart, dass man einen speziellen Arraytypen deklarieren muss ist eigentlich nur eine Delphi-Eigenart. ;)
Kieksde hier:
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
void Mööp(Color[] colors)
{
}

void Miep()
{
  Mööp(new Color[] { Color.Red, Color.Blue });
}
Baumunk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50

WinXP
Delphi 2005
BeitragVerfasst: Di 28.11.06 15:25 
Danke