Click here to Skip to main content
15,897,032 members
Home / Discussions / C#
   

C#

 
AnswerRe: Accessing data from data set Pin
Eduard Keilholz26-Nov-06 20:53
Eduard Keilholz26-Nov-06 20:53 
QuestionSearching for a key release event etc in console application Pin
Ghoditsttoawn26-Nov-06 17:23
Ghoditsttoawn26-Nov-06 17:23 
QuestionGetting default PDF viewer Pin
bankai12326-Nov-06 16:44
bankai12326-Nov-06 16:44 
AnswerRe: Getting default PDF viewer Pin
JacquesDP26-Nov-06 19:27
JacquesDP26-Nov-06 19:27 
AnswerRe: Getting default PDF viewer Pin
Weckmann27-Nov-06 4:04
Weckmann27-Nov-06 4:04 
QuestionDataRelation Problem Pin
Deepasubramanian26-Nov-06 16:11
Deepasubramanian26-Nov-06 16:11 
QuestionGet containing class? Pin
Lord Kixdemp26-Nov-06 16:01
Lord Kixdemp26-Nov-06 16:01 
AnswerRe: Get containing class? Pin
Judah Gabriel Himango26-Nov-06 16:27
sponsorJudah Gabriel Himango26-Nov-06 16:27 
In order for the player class to see the .AvailableWeapons of a Team class instance, you need to pass a team class instance into the player, via a function call or constructor. Something like this:

Team team1 = new Team();
Player playerA = new Player(team1);


The player class would look like htis:

class Player
{
    int CurrentWeaponIndex;
    Weapon CurrentWeapon;
    Team team;

    public Player(Team theTeam)
    {
        this.team = theTeam;
    }

    Weapon GetNextWeapon()
    {
        ++CurrentWeaponIndex;

        CurrentWeapon = team.AvailableWeapons[CurrentWeaponIndex];
    }
}


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: God-as-Judge, God-as-Forgiver
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


GeneralRe: Get containing class? Pin
Lord Kixdemp27-Nov-06 8:05
Lord Kixdemp27-Nov-06 8:05 
GeneralRe: Get containing class? Pin
Lord Kixdemp27-Nov-06 11:03
Lord Kixdemp27-Nov-06 11:03 
Questionhow to open a folder and get its handle? Pin
Shirley, Wang26-Nov-06 15:40
Shirley, Wang26-Nov-06 15:40 
QuestionSpliting short to 2 bytes Pin
Dwayner7926-Nov-06 14:47
Dwayner7926-Nov-06 14:47 
AnswerRe: Spliting short to 2 bytes Pin
Dwayner7926-Nov-06 14:55
Dwayner7926-Nov-06 14:55 
AnswerRe: Spliting short to 2 bytes Pin
bankai12326-Nov-06 17:56
bankai12326-Nov-06 17:56 
QuestionRegular Expressions+E-mail... Pin
ksor26-Nov-06 8:39
ksor26-Nov-06 8:39 
AnswerRe: Regular Expressions+E-mail... Pin
Christian Graus26-Nov-06 11:35
protectorChristian Graus26-Nov-06 11:35 
QuestionHow to fill DataGridView with Two Dimensional Array? [modified] Pin
mohamedyahyaelzayat26-Nov-06 6:53
mohamedyahyaelzayat26-Nov-06 6:53 
AnswerRe: How to fill DataGridView with Two Dimensional Array? Pin
Nader Elshehabi26-Nov-06 13:27
Nader Elshehabi26-Nov-06 13:27 
QuestionFormatting Console Output Pin
jgallen2326-Nov-06 6:24
jgallen2326-Nov-06 6:24 
AnswerRe: Formatting Console Output Pin
Guffa26-Nov-06 9:03
Guffa26-Nov-06 9:03 
Questionencoding Pin
yamamah26-Nov-06 5:41
yamamah26-Nov-06 5:41 
AnswerRe: encoding Pin
Not Active26-Nov-06 6:16
mentorNot Active26-Nov-06 6:16 
AnswerRe: encoding Pin
CPallini26-Nov-06 6:33
mveCPallini26-Nov-06 6:33 
QuestionVS - change file name - HELP! Pin
seq-26-Nov-06 5:25
seq-26-Nov-06 5:25 
AnswerRe: VS - change file name - HELP! Pin
Christian Graus26-Nov-06 11:31
protectorChristian Graus26-Nov-06 11:31 

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.