Click here to Skip to main content
15,440,341 members
Home / Discussions / C#
   

C#

 
GeneralRe: regex Pin
BillWoodruff14-Nov-17 14:43
mveBillWoodruff14-Nov-17 14:43 
GeneralRe: regex Pin
Richard Deeming16-Nov-17 7:51
mveRichard Deeming16-Nov-17 7:51 
QuestionBest machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Member 978298312-Nov-17 23:06
MemberMember 978298312-Nov-17 23:06 
AnswerRe: Best machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Gerry Schmitz13-Nov-17 4:44
mveGerry Schmitz13-Nov-17 4:44 
GeneralRe: Best machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Member 978298313-Nov-17 4:59
MemberMember 978298313-Nov-17 4:59 
GeneralRe: Best machine learning AI library to assess multiple inputs with different weights (non-linear) ? Pin
Gerry Schmitz13-Nov-17 5:01
mveGerry Schmitz13-Nov-17 5:01 
Questioncan't find the source of Collection was Modified Exception Pin
Alexander Kindel11-Nov-17 19:46
MemberAlexander Kindel11-Nov-17 19:46 
AnswerRe: can't find the source of Collection was Modified Exception Pin
OriginalGriff11-Nov-17 20:10
mveOriginalGriff11-Nov-17 20:10 
It makes a copy of Factors yes - in that it copies the reference to each object in the collection to a new collection, it does not duplicate the items themselves (a shallow copy, rather than a deep copy).
The new collection refers to exactly the same objects as the old one, and any change to those objects will be visible from both collections:
C#
public class MyClass
    {
    public int X;
    }
private void MyButton_Click(object sender, EventArgs e)
    {
    List<MyClass> items = new List<MyClass>() { new MyClass(){X = 111}, new MyClass(){X = 222}, new MyClass(){X = 333} };
    List<MyClass> itemsCopy = new List<MyClass>(items);
    items[0].X = 666;
    itemsCopy[1].X = 777;
    foreach (MyClass m in items)
        {
        Console.WriteLine(m.X);
        }
    ...
Will generate:
666
777
333
So if you will have to look closely at what you are doing with your new collection and the objects it contains.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: can't find the source of Collection was Modified Exception Pin
Alexander Kindel11-Nov-17 20:14
MemberAlexander Kindel11-Nov-17 20:14 
GeneralRe: can't find the source of Collection was Modified Exception Pin
OriginalGriff11-Nov-17 20:23
mveOriginalGriff11-Nov-17 20:23 
QuestionHow to simplify my code? Pin
Member 1347915010-Nov-17 12:09
MemberMember 1347915010-Nov-17 12:09 
AnswerRe: How to simplify my code? Pin
Afzaal Ahmad Zeeshan10-Nov-17 12:26
mveAfzaal Ahmad Zeeshan10-Nov-17 12:26 
QuestionUnhandled Argument Exception error in System.Drawing.dll Pin
zs6msd8-Nov-17 0:05
Memberzs6msd8-Nov-17 0:05 
AnswerRe: Unhandled Argument Exception error in System.Drawing.dll Pin
OriginalGriff8-Nov-17 0:28
mveOriginalGriff8-Nov-17 0:28 
Questionlibrary for connecting oracle from c#form Pin
Member 135093657-Nov-17 20:04
MemberMember 135093657-Nov-17 20:04 
AnswerRe: library for connecting oracle from c#form Pin
Pete O'Hanlon7-Nov-17 21:34
mvaPete O'Hanlon7-Nov-17 21:34 
GeneralRe: library for connecting oracle from c#form Pin
Member 135093658-Nov-17 21:26
MemberMember 135093658-Nov-17 21:26 
GeneralRe: library for connecting oracle from c#form Pin
Member 135093658-Nov-17 21:26
MemberMember 135093658-Nov-17 21:26 
AnswerRe: library for connecting oracle from c#form Pin
Mycroft Holmes8-Nov-17 14:18
professionalMycroft Holmes8-Nov-17 14:18 
QuestionGetting Data from web : C# failed while Excel works Pin
PozzaVecia5-Nov-17 9:06
MemberPozzaVecia5-Nov-17 9:06 
AnswerRe: Getting Data from web : C# failed while Excel works Pin
PozzaVecia5-Nov-17 9:19
MemberPozzaVecia5-Nov-17 9:19 
QuestionWrite audio to USB Modem via COM Port Pin
ManojKumarShah20174-Nov-17 22:45
MemberManojKumarShah20174-Nov-17 22:45 
QuestionRe: Write audio to USB Modem via COM Port Pin
Eddy Vluggen4-Nov-17 23:34
professionalEddy Vluggen4-Nov-17 23:34 
AnswerRe: Write audio to USB Modem via COM Port Pin
OriginalGriff4-Nov-17 23:35
mveOriginalGriff4-Nov-17 23:35 
GeneralRe: Write audio to USB Modem via COM Port Pin
ManojKumarShah20175-Nov-17 0:57
MemberManojKumarShah20175-Nov-17 0:57 

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.