Click here to Skip to main content
16,005,222 members
Home / Discussions / C#
   

C#

 
QuestionSerialize System.Web.UI.WebControls.Unit Pin
Foxcoming13-Mar-06 21:57
Foxcoming13-Mar-06 21:57 
AnswerRe: Serialize System.Web.UI.WebControls.Unit Pin
Steve Hansen13-Mar-06 23:06
Steve Hansen13-Mar-06 23:06 
GeneralRe: Serialize System.Web.UI.WebControls.Unit Pin
Foxcoming14-Mar-06 14:01
Foxcoming14-Mar-06 14:01 
GeneralRe: Serialize System.Web.UI.WebControls.Unit Pin
Steve Hansen14-Mar-06 19:58
Steve Hansen14-Mar-06 19:58 
Questionproject Pin
ali kanju13-Mar-06 21:51
ali kanju13-Mar-06 21:51 
AnswerRe: project Pin
J4amieC13-Mar-06 22:06
J4amieC13-Mar-06 22:06 
AnswerRe: project Pin
Steve Pullan14-Mar-06 12:09
Steve Pullan14-Mar-06 12:09 
QuestionClass Inheritance and Propertys Pin
Steini kallinn13-Mar-06 21:06
Steini kallinn13-Mar-06 21:06 
I have been wondering how to implement "class inheritance" so you can write code that looks something like program below. I want to make a class object like "player" with array index, then call to "Card" property which I want to have array indexed as well, and also inherits GetSuit() and GetValue() functions.

The two classes below are just something to start with. Because Im new to this kind of structure, can anyone point out what technology is used, give some examples or information on how to get them. Thanks Smile | :)

namespace ConsoleDebugger
{
    class Program
    {
	static public Player[] player = new Player[2];
	static public Deck deck = new Deck();

	static void Main(string[] args)
        {
		// How to implement this structure...
		player[0].Cards[0].GetSuit();

		// and how this function can store into the hand object...
		player[0].GrabCard( deck.DealNext() );
        }
    }
}

These two here below dont make much sens, just something to start with...
public class Player
{

	public void GrabCard(int SomeCard)
	{
		// stores into same card object...
	}

	public int Hand
	{
		// Inharets from Hand GetSuit() and GetValue()...
	}
}


public class Card
{

	private int[] yourCards = new int[2];

	public int this[int index]
	{
		get { return yourCards[index]; }
		set { yourCards[index] = value; }
	}

	public int GetValue()
	{
		// ???
	}

	public int GetSuit()
	{
		// ???
	}
}

AnswerRe: Class Inheritance and Propertys Pin
J4amieC13-Mar-06 22:03
J4amieC13-Mar-06 22:03 
GeneralRe: Class Inheritance and Propertys Pin
Steini kallinn13-Mar-06 23:32
Steini kallinn13-Mar-06 23:32 
GeneralRe: Class Inheritance and Propertys Pin
J4amieC13-Mar-06 23:53
J4amieC13-Mar-06 23:53 
QuestionConversion from BigEndian to Little Endia Pin
hpetriffer13-Mar-06 21:00
hpetriffer13-Mar-06 21:00 
AnswerRe: Conversion from BigEndian to Little Endia Pin
Divyang Mithaiwala13-Mar-06 21:49
Divyang Mithaiwala13-Mar-06 21:49 
GeneralRe: Conversion from BigEndian to Little Endia Pin
hpetriffer13-Mar-06 21:58
hpetriffer13-Mar-06 21:58 
AnswerRe: Conversion from BigEndian to Little Endia Pin
Steve Hansen13-Mar-06 23:13
Steve Hansen13-Mar-06 23:13 
GeneralRe: Conversion from BigEndian to Little Endia Pin
hpetriffer13-Mar-06 23:17
hpetriffer13-Mar-06 23:17 
GeneralRe: Conversion from BigEndian to Little Endia Pin
Steve Hansen13-Mar-06 23:26
Steve Hansen13-Mar-06 23:26 
QuestionHow to print the dynamic datagrid in web page Pin
angelagke13-Mar-06 20:43
angelagke13-Mar-06 20:43 
AnswerRe: How to print the dynamic datagrid in web page Pin
swap2015-Mar-06 5:26
swap2015-Mar-06 5:26 
GeneralRe: How to print the dynamic datagrid in web page Pin
angelagke15-Mar-06 15:16
angelagke15-Mar-06 15:16 
Questioncontent filtering Pin
Mitra77713-Mar-06 20:36
Mitra77713-Mar-06 20:36 
Questionhow to add scrollbar to my form ? Pin
hdv21213-Mar-06 20:30
hdv21213-Mar-06 20:30 
AnswerRe: how to add scrollbar to my form ? Pin
V.13-Mar-06 22:36
professionalV.13-Mar-06 22:36 
QuestionSocket releted Error Pin
Divyang Mithaiwala13-Mar-06 19:37
Divyang Mithaiwala13-Mar-06 19:37 
QuestionHow to pass commandline Arguements Pin
psmukil13-Mar-06 19:14
psmukil13-Mar-06 19:14 

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.