Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
AnswerRe: Which IP Address Represents LocalHost Pin
yoolo19-Oct-11 6:03
yoolo19-Oct-11 6:03 
QuestionError in DataContractSerializer class Pin
Sachin Sangal17-Oct-11 19:06
Sachin Sangal17-Oct-11 19:06 
AnswerRe: Error in DataContractSerializer class Pin
Richard MacCutchan17-Oct-11 23:16
mveRichard MacCutchan17-Oct-11 23:16 
GeneralRe: Error in DataContractSerializer class Pin
Sachin Sangal17-Oct-11 23:23
Sachin Sangal17-Oct-11 23:23 
GeneralRe: Error in DataContractSerializer class Pin
Mycroft Holmes17-Oct-11 23:35
professionalMycroft Holmes17-Oct-11 23:35 
GeneralRe: Error in DataContractSerializer class Pin
zincsulfate18-Oct-11 0:03
zincsulfate18-Oct-11 0:03 
GeneralRe: Error in DataContractSerializer class Pin
Dave Kreskowiak18-Oct-11 1:35
mveDave Kreskowiak18-Oct-11 1:35 
QuestionBug in .Net 2.0's ArrayList.Clone? Pin
Firo Atrum Ventus17-Oct-11 16:34
Firo Atrum Ventus17-Oct-11 16:34 
Hi guys, I've just encountered a strange bug (I think?) in ArrayList.Clone()

Here's my code :
C#
public ShipChromosome(ArrayList deckLength, ArrayList shipList, ArrayList allShipList)
{
    deckList = deckLength;
    shipsInDeck = (ArrayList)shipList.Clone();
    allShips = (ArrayList)allShipList.Clone();//The culprit
}

#region IChromosome Members

public IChromosome Clone()
{
    return new ShipChromosome(deckList, shipsInDeck, allShips);
}


Okay, Here's the exception :
System.ArgumentException was unhandled - Destination array was not long enough. Check destIndex and length, and the array's lower bounds.


Some detail about parameters:
deckList = ArrayList containing many int(s)
shipsInDeck = ArrayList containing (deckList.Count) ArrayList(s) which hold many ShipObject
allShips = ArrayList containing all ShipObject(s) in ShipsInDeck (Hey, I'm lazy!! Roll eyes | :rolleyes: )

Any idea guys?
Oxfords English < Official CCC Players Dictionary

Excuse me for my improper grammar and typos.
It's because English is my primary language, not my first language.

My first languages are C# and Java.
VB, ASP, JS, PHP and SQL are my second language.
Indonesian came as my third language.
My fourth language? I'm still creating it, I'll let you know when it's done! Big Grin | :-D

AnswerRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Luc Pattyn17-Oct-11 16:52
sitebuilderLuc Pattyn17-Oct-11 16:52 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Firo Atrum Ventus17-Oct-11 16:57
Firo Atrum Ventus17-Oct-11 16:57 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Mycroft Holmes17-Oct-11 17:43
professionalMycroft Holmes17-Oct-11 17:43 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Luc Pattyn17-Oct-11 17:49
sitebuilderLuc Pattyn17-Oct-11 17:49 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Firo Atrum Ventus17-Oct-11 18:14
Firo Atrum Ventus17-Oct-11 18:14 
AnswerRe: Bug in .Net 2.0's ArrayList.Clone? Pin
BobJanova17-Oct-11 23:31
BobJanova17-Oct-11 23:31 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Firo Atrum Ventus18-Oct-11 15:31
Firo Atrum Ventus18-Oct-11 15:31 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
BobJanova18-Oct-11 22:43
BobJanova18-Oct-11 22:43 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
Firo Atrum Ventus18-Oct-11 23:14
Firo Atrum Ventus18-Oct-11 23:14 
GeneralRe: Bug in .Net 2.0's ArrayList.Clone? Pin
BobJanova19-Oct-11 2:40
BobJanova19-Oct-11 2:40 
QuestionHow do you define a default html in silverlight? Pin
Xarzu17-Oct-11 9:38
Xarzu17-Oct-11 9:38 
AnswerRe: How do you define a default html in silverlight? Pin
Mark Salsbery17-Oct-11 14:07
Mark Salsbery17-Oct-11 14:07 
QuestionIs this safe Pin
Mide5517-Oct-11 1:58
Mide5517-Oct-11 1:58 
QuestionRe: Is this safe Pin
Yuri Vital17-Oct-11 2:05
Yuri Vital17-Oct-11 2:05 
AnswerRe: Is this safe Pin
Mide5517-Oct-11 2:09
Mide5517-Oct-11 2:09 
GeneralRe: Is this safe Pin
harold aptroot17-Oct-11 2:22
harold aptroot17-Oct-11 2:22 
GeneralRe: Is this safe Pin
Mide5517-Oct-11 2:32
Mide5517-Oct-11 2:32 

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.