Click here to Skip to main content
15,899,937 members
Home / Discussions / C#
   

C#

 
AnswerRe: insert value into datagridview Pin
Nish Nishant12-Feb-07 8:19
sitebuilderNish Nishant12-Feb-07 8:19 
GeneralRe: insert value into datagridview Pin
cocoonwls12-Feb-07 13:58
cocoonwls12-Feb-07 13:58 
QuestionC# setup project custom action Pin
pole_cat12-Feb-07 7:38
pole_cat12-Feb-07 7:38 
QuestionHow do I do this? Pin
Ranger4912-Feb-07 7:13
Ranger4912-Feb-07 7:13 
AnswerRe: How do I do this? Pin
Ranger4912-Feb-07 8:12
Ranger4912-Feb-07 8:12 
GeneralRe: How do I do this? Pin
Ranger4912-Feb-07 8:27
Ranger4912-Feb-07 8:27 
AnswerRe: How do I do this? Pin
Christian Graus12-Feb-07 8:38
protectorChristian Graus12-Feb-07 8:38 
AnswerRe: How do I do this? Pin
Luc Pattyn12-Feb-07 11:56
sitebuilderLuc Pattyn12-Feb-07 11:56 
Hi,

your code compiles just fine for me. This is what I have:
public class Storage {
	public int CenterX = 150;
	public int CenterY = 150;
	public int NumberOfVectors = 0;
	public int NumberOfVertices = 0;

	public const int MAXNumberOfVectors = 100;
	public const int MAXNumberOfVertices = 200;
	public int[] StoreVerticesFrom = new int[MAXNumberOfVertices];
	public int[] StoreVerticesTo = new int[MAXNumberOfVertices];
}


So I dont know what went wrong for you. Also I suggest you mention the exact
compiler message (instead of "wont compile" or "does not work" or so).

And there is nothing wrong in using the const keyword to indicate something will
never allow to be modified, it is considered good practice.

BTW I concur with Christian's remark to use some (unlimited) collection instead;
you seldom need to impose a maximum (you might want to do that when memory becomes
tight and can be better spent, or when simulating a fixed size cache, or so).

Smile | :)




Luc Pattyn

GeneralRe: How do I do this? Pin
Ranger4912-Feb-07 17:54
Ranger4912-Feb-07 17:54 
Question.Net Remoting Debugging Pin
pssuresh12-Feb-07 7:01
pssuresh12-Feb-07 7:01 
QuestionRE: Updating a live application Pin
Saamir12-Feb-07 6:29
Saamir12-Feb-07 6:29 
AnswerRe: RE: Updating a live application Pin
Ed.Poore12-Feb-07 8:33
Ed.Poore12-Feb-07 8:33 
GeneralRe: RE: Updating a live application Pin
Saamir12-Feb-07 9:16
Saamir12-Feb-07 9:16 
GeneralRe: RE: Updating a live application Pin
Ed.Poore12-Feb-07 10:20
Ed.Poore12-Feb-07 10:20 
GeneralRe: RE: Updating a live application Pin
Saamir13-Feb-07 2:51
Saamir13-Feb-07 2:51 
Questionread ip adress from client Pin
ujupanmester12-Feb-07 5:54
ujupanmester12-Feb-07 5:54 
AnswerRe: read ip adress from client Pin
Bassam Saoud12-Feb-07 6:11
Bassam Saoud12-Feb-07 6:11 
QuestionFirewall Pin
A.m.a.L12-Feb-07 5:46
A.m.a.L12-Feb-07 5:46 
AnswerRe: Firewall Pin
Pete O'Hanlon12-Feb-07 23:39
mvePete O'Hanlon12-Feb-07 23:39 
Questioncapture and play audio Pin
ThetaClear12-Feb-07 5:25
ThetaClear12-Feb-07 5:25 
AnswerRe: capture and play audio Pin
Ed.Poore12-Feb-07 8:35
Ed.Poore12-Feb-07 8:35 
GeneralRe: capture and play audio Pin
ThetaClear12-Feb-07 20:30
ThetaClear12-Feb-07 20:30 
QuestionLANGUAGE CHOİCE Pin
king_0509812-Feb-07 4:41
king_0509812-Feb-07 4:41 
AnswerRe: LANGUAGE CHOICE Pin
led mike12-Feb-07 4:44
led mike12-Feb-07 4:44 
GeneralRe: LANGUAGE CHOICE Pin
Paul Conrad12-Feb-07 5:12
professionalPaul Conrad12-Feb-07 5:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.