Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to handle OnMouseMove (NC_MOUSEMOVE) using C#? Pin
Henry Minute11-Apr-09 0:29
Henry Minute11-Apr-09 0:29 
AnswerRe: How to handle OnMouseMove (NC_MOUSEMOVE) using C#? Pin
Colin Angus Mackay10-Apr-09 8:31
Colin Angus Mackay10-Apr-09 8:31 
QuestionCan someone please tell me what is wrong with this List function? Pin
stonebergftw10-Apr-09 7:49
stonebergftw10-Apr-09 7:49 
AnswerRe: Can someone please tell me what is wrong with this List function? Pin
Colin Angus Mackay10-Apr-09 8:00
Colin Angus Mackay10-Apr-09 8:00 
GeneralRe: Can someone please tell me what is wrong with this List function? Pin
stonebergftw10-Apr-09 8:12
stonebergftw10-Apr-09 8:12 
GeneralRe: Can someone please tell me what is wrong with this List function? Pin
Colin Angus Mackay10-Apr-09 8:25
Colin Angus Mackay10-Apr-09 8:25 
GeneralRe: Can someone please tell me what is wrong with this List function? Pin
stonebergftw10-Apr-09 8:37
stonebergftw10-Apr-09 8:37 
GeneralRe: Can someone please tell me what is wrong with this List function? Pin
Colin Angus Mackay10-Apr-09 8:57
Colin Angus Mackay10-Apr-09 8:57 
stonebergftw wrote:
The List function is REALLY confusing me


List is a class not a function. A list has many methods (which is what C# calls functions).

stonebergftw wrote:
I am trying to create a 3x3 array(or list) in the function CreateTableInstance, set each value in that array to 0, and then return the value into the List Variable, theBoard, located in the module button1_Click.


This is still confused. If you create an array there is no point returning it into a List variable. You would want to return it into an array variable.

The following returns a two dimensional array of type int:
public int[,] CreateTableInstance()
{
    int[,] result = new int[3,3];
 
    // Actually these for loops are probably redundant because 
    // 0 is the default value for an int
    for (int i=0; i<3 i++)
    {
        for (int j; j<3; j++)
        {
            resut[i,j] = 0;
        }
    }
    return result;
}
DISCLAIMER: I typed it directly and didn't test it
In your event handler you would do something like this to get the array from the method

int[,] theBoard = CreateTableInstance();



GeneralRe: Can someone please tell me what is wrong with this List function? Pin
stonebergftw10-Apr-09 9:08
stonebergftw10-Apr-09 9:08 
QuestionWhy is the image erased by the background? Pin
garry.fang10-Apr-09 6:41
garry.fang10-Apr-09 6:41 
AnswerRe: Why is the image erased by the background? Pin
Luc 64801110-Apr-09 6:58
Luc 64801110-Apr-09 6:58 
GeneralRe: Why is the image erased by the background? Pin
garry.fang10-Apr-09 7:20
garry.fang10-Apr-09 7:20 
GeneralRe: Why is the image erased by the background? Pin
Dan Neely10-Apr-09 8:36
Dan Neely10-Apr-09 8:36 
GeneralRe: Why is the image erased by the background? Pin
garry.fang10-Apr-09 9:26
garry.fang10-Apr-09 9:26 
AnswerRe: Why is the image erased by the background? Pin
Dan Neely10-Apr-09 7:04
Dan Neely10-Apr-09 7:04 
QuestionHow to run swf file from c#? Pin
Supra210-Apr-09 5:26
Supra210-Apr-09 5:26 
AnswerRe: How to run swf file from c#? Pin
Dan Neely10-Apr-09 7:08
Dan Neely10-Apr-09 7:08 
AnswerRe: How to run swf file from c#? Pin
krishna_goluguri8-Jul-10 0:25
krishna_goluguri8-Jul-10 0:25 
QuestionExcel grid lines issue Pin
winsrividhya10-Apr-09 5:24
winsrividhya10-Apr-09 5:24 
AnswerRe: Excel grid lines issue Pin
Henry Minute10-Apr-09 8:31
Henry Minute10-Apr-09 8:31 
Questionusing infomessege in firebird or other database Pin
muhammedmustafa10-Apr-09 4:48
muhammedmustafa10-Apr-09 4:48 
AnswerRe: using infomessege in firebird or other database Pin
Colin Angus Mackay10-Apr-09 5:04
Colin Angus Mackay10-Apr-09 5:04 
GeneralRe: using infomessege in firebird or other database Pin
muhammedmustafa10-Apr-09 21:24
muhammedmustafa10-Apr-09 21:24 
GeneralRe: using infomessege in firebird or other database Pin
Colin Angus Mackay12-Apr-09 12:12
Colin Angus Mackay12-Apr-09 12:12 
Questionaccesing Gridview Data in javascript function Pin
Abhishek Rana10-Apr-09 2:45
Abhishek Rana10-Apr-09 2:45 

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.