The Artima Developer Community
Sponsored Link

C# Answers Forum
Simple C# Help

2 replies on 1 page. Most recent reply: Aug 28, 2008 11:46 PM by John D

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Jason A

Posts: 1
Nickname: neotad
Registered: Dec, 2007

Simple C# Help Posted: Dec 10, 2007 10:36 AM
Reply to this message Reply
Advertisement
Hi, I am a beginner with C# and am having trouble figuring out how to declare an array with 5 elements and in a loop initialize the elements with Subscript*10.

I would appreciate any help any of you could give me.

Thanks.


Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Simple C# Help Posted: Dec 10, 2007 11:17 PM
Reply to this message Reply
To find out how to declare an array, Google 'c# array' (without the quotes).

To find out how write a loop, Google 'c# loop' (again without the quotes).

Do that, show what so of result you come up with and we'll see how to go from there.

John D

Posts: 2
Nickname: thewebhost
Registered: Aug, 2008

Re: Simple C# Help Posted: Aug 28, 2008 11:46 PM
Reply to this message Reply
Example of Array:

int[] numbers; // declaration of numbers
numbers = new int[5]; //declare 5 elements of array

Example of For loop:

for(int i=1;i<=10;i++)
{

}

Flat View: This topic has 2 replies on 1 page
Topic: DataGridView Selections Previous Topic   Next Topic Topic: Recursion and Circular References

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use