Click here to Skip to main content
15,908,173 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I encrypt to message in WCF? Pin
SeMartens9-Jul-09 21:10
SeMartens9-Jul-09 21:10 
QuestionModified TextBox property not persisting in designer Pin
SillyPants9-Jul-09 19:51
SillyPants9-Jul-09 19:51 
AnswerRe: Modified TextBox property not persisting in designer Pin
DaveyM699-Jul-09 22:39
professionalDaveyM699-Jul-09 22:39 
QuestionOver Lay Image Pin
satsumatable9-Jul-09 19:27
satsumatable9-Jul-09 19:27 
AnswerRe: Over Lay Image Pin
dan!sh 9-Jul-09 19:31
professional dan!sh 9-Jul-09 19:31 
QuestionTo open a new file Pin
Rupaa9-Jul-09 19:18
Rupaa9-Jul-09 19:18 
AnswerRe: To open a new file Pin
MumbleB9-Jul-09 19:22
MumbleB9-Jul-09 19:22 
AnswerRe: To open a new file Pin
0x3c09-Jul-09 19:40
0x3c09-Jul-09 19:40 
AnswerRe: To open a new file Pin
Huxley Stronghead10-Jul-09 1:15
Huxley Stronghead10-Jul-09 1:15 
Questioni want to write an application use sanner Pin
nghia.VKS@gmail.com9-Jul-09 18:38
nghia.VKS@gmail.com9-Jul-09 18:38 
AnswerRe: i want to write an application use sanner Pin
_Maxxx_9-Jul-09 19:00
professional_Maxxx_9-Jul-09 19:00 
JokeRe: i want to write an application use sanner Pin
himanshu25619-Jul-09 19:03
himanshu25619-Jul-09 19:03 
JokeRe: i want to write an application use sanner Pin
dan!sh 9-Jul-09 19:05
professional dan!sh 9-Jul-09 19:05 
GeneralRe: i want to write an application use sanner Pin
MumbleB9-Jul-09 19:23
MumbleB9-Jul-09 19:23 
GeneralRe: i want to write an application use sanner Pin
dan!sh 9-Jul-09 19:28
professional dan!sh 9-Jul-09 19:28 
AnswerRe: i want to write an application use sanner Pin
vaghelabhavesh9-Jul-09 20:37
vaghelabhavesh9-Jul-09 20:37 
QuestionTaking variables from other classes. Pin
nik1219-Jul-09 17:02
nik1219-Jul-09 17:02 
AnswerRe: Taking variables from other classes. Pin
N a v a n e e t h9-Jul-09 17:06
N a v a n e e t h9-Jul-09 17:06 
GeneralRe: Taking variables from other classes. Pin
nik1219-Jul-09 17:12
nik1219-Jul-09 17:12 
public class CharClasses
{
public int healthPoints = 0;
public int manaPoints = 0;
public int strength = 0;
public int dexterity = 0;
public int speed = 0;
public int intelligence = 0;

public CharClasses (string characterClass)
{
if (characterClass == "Warrior")
{
healthPoints = 100;
manaPoints = 10;
strength = 10;
dexterity = 5;
speed = 3;
intelligence = 0;
}

if (characterClass == "Archer")
{
healthPoints = 75;
manaPoints = 10;
strength = 3;
dexterity = 10;
speed = 5;
intelligence = 0;
}

if (characterClass == "Assassin")
{
healthPoints = 75;
manaPoints = 10;
strength = 5;
dexterity = 3;
speed = 10;
intelligence = 0;
}

if (characterClass == "Mage")
{
healthPoints = 50;
manaPoints = 50;
strength = 0;
dexterity = 5;
speed = 3;
intelligence = 10;
}
}
}

public class Leveling
{
public int level = 1;
public int experience = 0;

public Leveling()
{


if (experience == ((experience + 100) * 1.5))
{
level++;
}
}
}

I'm trying to take the constructor named "characterClass" from the class CharClasses and use it in the class Leveling.

CharClasses Class = new CharClasses(characterClass); I'm trying to make this code work but the characterClass part of it does not seem to work...
GeneralRe: Taking variables from other classes. Pin
N a v a n e e t h9-Jul-09 17:19
N a v a n e e t h9-Jul-09 17:19 
GeneralRe: Taking variables from other classes. Pin
nik1219-Jul-09 17:23
nik1219-Jul-09 17:23 
GeneralRe: Taking variables from other classes. Pin
N a v a n e e t h9-Jul-09 17:36
N a v a n e e t h9-Jul-09 17:36 
GeneralRe: Taking variables from other classes. Pin
Gary Stafford9-Jul-09 17:41
Gary Stafford9-Jul-09 17:41 
QuestionReading and storing variables from data files Pin
ReynaW12239-Jul-09 16:18
ReynaW12239-Jul-09 16:18 
AnswerRe: Reading and storing variables from data files Pin
N a v a n e e t h9-Jul-09 17:10
N a v a n e e t h9-Jul-09 17:10 

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.