Click here to Skip to main content
15,911,711 members
Home / Discussions / C#
   

C#

 
GeneralRe: Async method/task issue Pin
Gerry Schmitz4-Feb-18 7:05
mveGerry Schmitz4-Feb-18 7:05 
Questionin c# school management project Pin
Member 1289859014-Nov-17 19:51
Member 1289859014-Nov-17 19:51 
AnswerRe: in c# school management project Pin
OriginalGriff14-Nov-17 20:11
mveOriginalGriff14-Nov-17 20:11 
AnswerRe: in c# school management project Pin
Gerry Schmitz15-Nov-17 5:41
mveGerry Schmitz15-Nov-17 5:41 
AnswerRe: in c# school management project Pin
jschell15-Nov-17 7:03
jschell15-Nov-17 7:03 
QuestionDetermine Distance between HD Camera and Object Pin
Member 1041074814-Nov-17 4:09
Member 1041074814-Nov-17 4:09 
AnswerRe: Determine Distance between HD Camera and Object Pin
Richard MacCutchan14-Nov-17 4:51
mveRichard MacCutchan14-Nov-17 4:51 
AnswerRe: Determine Distance between HD Camera and Object Pin
Dave Kreskowiak14-Nov-17 5:24
mveDave Kreskowiak14-Nov-17 5:24 
AnswerRe: Determine Distance between HD Camera and Object Pin
Gerry Schmitz15-Nov-17 5:39
mveGerry Schmitz15-Nov-17 5:39 
Questionmy projects link button not work in iphone 6s but desktop work properly why? Pin
Member 1352056914-Nov-17 2:27
Member 1352056914-Nov-17 2:27 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Pete O'Hanlon14-Nov-17 3:37
mvePete O'Hanlon14-Nov-17 3:37 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Richard Deeming14-Nov-17 3:37
mveRichard Deeming14-Nov-17 3:37 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Richard MacCutchan14-Nov-17 4:50
mveRichard MacCutchan14-Nov-17 4:50 
AnswerRe: my projects link button not work in iphone 6s but desktop work properly why? Pin
Gerry Schmitz15-Nov-17 5:42
mveGerry Schmitz15-Nov-17 5:42 
Questionregex Pin
arkiboys14-Nov-17 1:50
arkiboys14-Nov-17 1:50 
AnswerRe: regex Pin
Richard Deeming14-Nov-17 2:08
mveRichard Deeming14-Nov-17 2:08 
AnswerRe: regex Pin
Kenneth Haugland14-Nov-17 2:09
mvaKenneth Haugland14-Nov-17 2:09 
GeneralRe: regex Pin
BillWoodruff14-Nov-17 14:43
professionalBillWoodruff14-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
Member 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
Member 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
Alexander 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!

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.