Click here to Skip to main content
15,902,863 members
Home / Discussions / C#
   

C#

 
QuestionWhat is the primary key, super key, foreign key and candidate key in the DBMS? Pin
Alagiri.periyasamy@merrillcorp.com27-Aug-12 3:19
Alagiri.periyasamy@merrillcorp.com27-Aug-12 3:19 
AnswerRe: What is the primary key, super key, foreign key and candidate key in the DBMS? Pin
fjdiewornncalwe27-Aug-12 3:24
professionalfjdiewornncalwe27-Aug-12 3:24 
Questionprogrammatically determine presence of webcam Pin
Danzy8327-Aug-12 0:45
Danzy8327-Aug-12 0:45 
AnswerRe: programmatically determine presence of webcam Pin
Abhinav S27-Aug-12 1:47
Abhinav S27-Aug-12 1:47 
GeneralRe: programmatically determine presence of webcam Pin
pramod.hegde27-Aug-12 2:18
professionalpramod.hegde27-Aug-12 2:18 
QuestionHow to configure the web projects in IIS Express using c# Pin
vadiveln26-Aug-12 17:56
vadiveln26-Aug-12 17:56 
QuestionProblem with gridview Pin
abhi29198426-Aug-12 16:12
abhi29198426-Aug-12 16:12 
AnswerRe: Problem with gridview Pin
Mycroft Holmes26-Aug-12 17:35
professionalMycroft Holmes26-Aug-12 17:35 
QuestionTrouble passing variables Pin
drgsldr6926-Aug-12 12:06
drgsldr6926-Aug-12 12:06 
AnswerRe: Trouble passing variables Pin
Wes Aday26-Aug-12 12:50
professionalWes Aday26-Aug-12 12:50 
GeneralRe: Trouble passing variables Pin
drgsldr6926-Aug-12 14:46
drgsldr6926-Aug-12 14:46 
GeneralRe: Trouble passing variables Pin
Wes Aday26-Aug-12 14:50
professionalWes Aday26-Aug-12 14:50 
GeneralRe: Trouble passing variables Pin
drgsldr6926-Aug-12 16:02
drgsldr6926-Aug-12 16:02 
GeneralRe: Trouble passing variables Pin
Wes Aday26-Aug-12 16:06
professionalWes Aday26-Aug-12 16:06 
GeneralRe: Trouble passing variables Pin
drgsldr6926-Aug-12 16:27
drgsldr6926-Aug-12 16:27 
GeneralRe: Trouble passing variables Pin
lukeer27-Aug-12 0:13
lukeer27-Aug-12 0:13 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 0:26
professionalWes Aday27-Aug-12 0:26 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 1:55
drgsldr6927-Aug-12 1:55 
GeneralRe: Trouble passing variables Pin
lukeer27-Aug-12 2:04
lukeer27-Aug-12 2:04 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 2:24
drgsldr6927-Aug-12 2:24 
GeneralRe: Trouble passing variables Pin
lukeer27-Aug-12 2:48
lukeer27-Aug-12 2:48 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 2:19
professionalWes Aday27-Aug-12 2:19 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 2:26
drgsldr6927-Aug-12 2:26 
GeneralRe: Trouble passing variables Pin
Wes Aday27-Aug-12 2:54
professionalWes Aday27-Aug-12 2:54 
GeneralRe: Trouble passing variables Pin
drgsldr6927-Aug-12 3:20
drgsldr6927-Aug-12 3:20 
They are set in RollStr,
C#
public void RollStr()
{
    Abilities BaseClass = new Abilities();
    int Str;

    Str = dice.Roll5D6();
    Console.Write("Str: {0} \n", Str);
    //Reroll the dice
    char MyChoice;
    string MyInput;
    char ReRoll = Convert.ToChar("y");

    Console.Write("Would you like to reroll this score?");
    MyInput = Console.ReadLine();
    MyChoice = Convert.ToChar(MyInput);

    if (MyInput == Convert.ToString(ReRoll))
    {
        BaseClass.RollStr();
    }

}

used in RollAbilities()
C#
public void ShowAbilities(int Str, int Dex, int Con, int Int, int Wis, int Cha)
{
    Console.WriteLine("Strength:     {0}\n", Str);
    Console.WriteLine("Dexterity:    {0}\n", Dex);
    Console.WriteLine("Constitution: {0}\n", Con);
    Console.WriteLine("Intelligence: {0}\n", Int);
    Console.WriteLine("Wisdom:       {0}\n", Wis);
    Console.WriteLine("Charisma:     {0}\n", Cha);
}

which i was informed I could pass them from there to ShowAbilities which I use in
C#
Abilities abilities = new Abilities();
  public void Character()
   {
      string N;
      N = base.Name();
      Console.Write("\n");
      Console.Write("Your Name is: {0} \n", N);
      abilities.ShowAbilities(Str, Dex, Con, Int, Wis, Cha);
   }

All I want ShowAbilities to do is output the scores saved from RollAbilities. That way I can call it in Character()

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.