Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
AnswerRe: about database Pin
miss YY29-Oct-09 19:07
miss YY29-Oct-09 19:07 
GeneralRe: about database Pin
padmanabhan N29-Oct-09 19:57
padmanabhan N29-Oct-09 19:57 
GeneralRe: about database Pin
Christian Graus29-Oct-09 20:57
protectorChristian Graus29-Oct-09 20:57 
GeneralRe: about database Pin
miss YY1-Nov-09 20:40
miss YY1-Nov-09 20:40 
Questionabout tree view Pin
miss YY29-Oct-09 18:35
miss YY29-Oct-09 18:35 
AnswerRe: about tree view Pin
Christian Graus29-Oct-09 18:45
protectorChristian Graus29-Oct-09 18:45 
GeneralRe: about tree view Pin
vivasaayi29-Oct-09 19:09
vivasaayi29-Oct-09 19:09 
QuestionNeed advice and help with editing arraylists Pin
rooster215429-Oct-09 17:17
rooster215429-Oct-09 17:17 
I've got 32 arraylists, each representing one team. I also will have 1696 players, with 53 players assigned to each team. Each player is one array (named by player number) that contains that player's attributes (first name, last name, speed, position, etc). I'm having trouble pointing my main menu to a method that will go through all of these players and send players of particular positions to particular methods to obtain their overall rating. Like, for example, if the player is a CB, that player will be sent to the CBCalculator, obtain his overall rating, input it into the player's array, and then loop to the next player in the list. Also, I'm having trouble setting a rating cap--the maximum attainable overall rating will be 99; anything overall rating that is calculated to be above 99 will be set at 99.

This is what I have so far for the position "sorter":

foreach (Player i in teams) //teams is an arraylist of all 32 team arraylists
{
    switch (position)
    {
        case "CB":
            CBCalc(int SPD);
            break;
        case "FS":
            FSCalc();
            break;
        default:
            Console.WriteLine("Error 2");
            break;
    }


This is what I have so far for a test Calculator method:

public static void CBCalc(int SPD)
{
    //CB
    double cbOverall = 28 + ((SPD - 50) / 2.5)
    int cbOverall2 = Convert.ToInt32(cbOverall);
    if (cbOverall2 >= 99)
    {
        cbOverall2 == 99;           //overall rating limit set at 99
    }


http://i783.photobucket.com/albums/yy112/rooster2154/ProgramLayout_10-29-09.jpg
The above link is to help clarify what i'm trying to do and how the program is set up

If you think you can help me along in my project please add me:
YIM: rooster2154
AnswerRe: Need advice and help with editing arraylists Pin
Luc Pattyn29-Oct-09 17:33
sitebuilderLuc Pattyn29-Oct-09 17:33 
GeneralRe: Need advice and help with editing arraylists Pin
rooster215431-Oct-09 14:49
rooster215431-Oct-09 14:49 
GeneralRe: Need advice and help with editing arraylists Pin
Luc Pattyn31-Oct-09 15:17
sitebuilderLuc Pattyn31-Oct-09 15:17 
QuestionTake pictures with multiple webcams Pin
toby3129-Oct-09 17:09
toby3129-Oct-09 17:09 
AnswerRe: Take pictures with multiple webcams Pin
Christian Graus29-Oct-09 18:46
protectorChristian Graus29-Oct-09 18:46 
QuestionPressing buttons in a webpage programmatically Pin
Nanostrike29-Oct-09 12:07
Nanostrike29-Oct-09 12:07 
AnswerRe: Pressing buttons in a webpage programmatically Pin
Christian Graus29-Oct-09 12:33
protectorChristian Graus29-Oct-09 12:33 
AnswerRe: Pressing buttons in a webpage programmatically Pin
Naruki30-Oct-09 0:13
Naruki30-Oct-09 0:13 
Questiontext formatting in two language Pin
Milad79429-Oct-09 10:26
professionalMilad79429-Oct-09 10:26 
AnswerRe: text formatting in two language Pin
Abhishek Sur29-Oct-09 10:38
professionalAbhishek Sur29-Oct-09 10:38 
Questionhow to open Image n Video file header in c# Pin
shrikant121329-Oct-09 8:29
shrikant121329-Oct-09 8:29 
AnswerRe: how to open Image n Video file header in c# Pin
Dave Kreskowiak29-Oct-09 10:39
mveDave Kreskowiak29-Oct-09 10:39 
AnswerRe: how to open Image n Video file header in c# Pin
Abhishek Sur29-Oct-09 10:40
professionalAbhishek Sur29-Oct-09 10:40 
GeneralRe: how to open Image n Video file header in c# Pin
Christian Graus29-Oct-09 12:06
protectorChristian Graus29-Oct-09 12:06 
GeneralRe: how to open Image n Video file header in c# Pin
shrikant121329-Oct-09 15:33
shrikant121329-Oct-09 15:33 
GeneralRe: how to open Image n Video file header in c# Pin
Christian Graus29-Oct-09 18:47
protectorChristian Graus29-Oct-09 18:47 
GeneralRe: how to open Image n Video file header in c# Pin
shrikant121330-Oct-09 6:15
shrikant121330-Oct-09 6:15 

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.