Is it possible to create an array of a user class?
-
Hello, (call it my laziness or my haste that I am post a question straight here instead of consulting the reference books) I have a point class in my project called FoxPoint, can I make a 2D array like this:
FoxPoint[,] strokes = new FoxPoint[4, 10];
It's giving me strange errors:Error 1 Inconsistent accessibility: parameter type FOX_CSharp.FoxPoint[*,*]' is less accessible than method 'FOX_CSharp.ConComp2Form.DrawBoundries(FOX_CSharp.FoxPoint[*,*])' C:\...\FOX_CSharp - Integrated - Aug 05 06\FOX_CSharp\ConComp2Form.cs 195 21 FOX_CSharp
- A programmer's national anthem; "AAAAAHHHHH!!!!"
-
Hello, (call it my laziness or my haste that I am post a question straight here instead of consulting the reference books) I have a point class in my project called FoxPoint, can I make a 2D array like this:
FoxPoint[,] strokes = new FoxPoint[4, 10];
It's giving me strange errors:Error 1 Inconsistent accessibility: parameter type FOX_CSharp.FoxPoint[*,*]' is less accessible than method 'FOX_CSharp.ConComp2Form.DrawBoundries(FOX_CSharp.FoxPoint[*,*])' C:\...\FOX_CSharp - Integrated - Aug 05 06\FOX_CSharp\ConComp2Form.cs 195 21 FOX_CSharp
- A programmer's national anthem; "AAAAAHHHHH!!!!"
You have something wrong with "public" and "private". Change all to private or change all to public to solve it. See this: http://www.dotnet247.com/247reference/msgs/7/38448.aspx
-
You have something wrong with "public" and "private". Change all to private or change all to public to solve it. See this: http://www.dotnet247.com/247reference/msgs/7/38448.aspx
-
Hello, (call it my laziness or my haste that I am post a question straight here instead of consulting the reference books) I have a point class in my project called FoxPoint, can I make a 2D array like this:
FoxPoint[,] strokes = new FoxPoint[4, 10];
It's giving me strange errors:Error 1 Inconsistent accessibility: parameter type FOX_CSharp.FoxPoint[*,*]' is less accessible than method 'FOX_CSharp.ConComp2Form.DrawBoundries(FOX_CSharp.FoxPoint[*,*])' C:\...\FOX_CSharp - Integrated - Aug 05 06\FOX_CSharp\ConComp2Form.cs 195 21 FOX_CSharp
- A programmer's national anthem; "AAAAAHHHHH!!!!"
DrawBoundries
ispublic
, but takes an argumentFOX_CSharp.FoxPoint[*,*]
that is less accessible (e.g. private). To call the function, you actually need aFoxPoint
, so the funciton can be called only as if it were private. You need to make FoxPoint public, too.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Tree in C# || Fold With Us! || sighist