Click here to Skip to main content
15,917,795 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questioniframe content [modified] Pin
epcode15015-Aug-09 16:46
epcode15015-Aug-09 16:46 
QuestionDatabase Data Entry problem Pin
jestgr5-Aug-09 11:07
jestgr5-Aug-09 11:07 
AnswerRe: Database Data Entry problem Pin
Christian Graus5-Aug-09 11:38
protectorChristian Graus5-Aug-09 11:38 
Questioninsert query Pin
sajjy5-Aug-09 9:59
sajjy5-Aug-09 9:59 
AnswerRe: insert query Pin
Blue_Boy5-Aug-09 10:23
Blue_Boy5-Aug-09 10:23 
GeneralRe: insert query Pin
sajjy5-Aug-09 10:39
sajjy5-Aug-09 10:39 
GeneralRe: insert query Pin
Blue_Boy5-Aug-09 10:41
Blue_Boy5-Aug-09 10:41 
QuestionArrayList Objects referencing to old objects Pin
freeman19895-Aug-09 8:25
freeman19895-Aug-09 8:25 
Hi, everyone, I am doing a mobile project based on C# language and I encounter some difficulty regarding old references in an arraylist.

Basically I have an existing object with an arraylist of objects, and wish to make a copy of that. However, everytime I tried to do so, the objects will remain referenced to the old arraylist.

As such, I wish to ask if there is any way to create an independent copy of this object (that contains an arraylist of objects)


Here is my code:

//Get the admin sector
        Sector tempAdmin = getAdminSector(SectorList);

        Sector admin = new Sector();

        admin.CentrePointXCoor = tempAdmin.CentrePointXCoor;
        admin.CentrePointYCoor = tempAdmin.CentrePointYCoor;
        admin.Name = tempAdmin.Name;
        admin.Position = tempAdmin.Position;
        admin.SectorHeight = tempAdmin.SectorHeight;
        admin.SectorWidth = tempAdmin.SectorWidth;
        FixedLocation[] existingItems = (FixedLocation[])tempAdmin.Items.ToArray(typeof(FixedLocation));

        FixedLocation f1 = new FixedLocation();

        foreach (FixedLocation _loc_ in existingItems)
        {
            f1.Description = _loc_.Description;
            f1.Id = _loc_.Id;
            f1.Name = _loc_.Name;
            f1.Position = _loc_.Position;
            f1.Rank = _loc_.Rank;
            f1.XCoor = _loc_.XCoor;
            f1.YCoor = _loc_.YCoor;


            admin.Items.Add(f1);
            f1 = new FixedLocation();
        }



I thank anyone who reply to this in advance : )
AnswerRe: ArrayList Objects referencing to old objects Pin
fuzionist5-Aug-09 8:31
fuzionist5-Aug-09 8:31 
AnswerRe: ArrayList Objects referencing to old objects Pin
N a v a n e e t h5-Aug-09 9:09
N a v a n e e t h5-Aug-09 9:09 
GeneralRe: ArrayList Objects referencing to old objects Pin
fuzionist5-Aug-09 9:51
fuzionist5-Aug-09 9:51 
QuestionAjax not working Pin
Ersan Ercek5-Aug-09 8:12
Ersan Ercek5-Aug-09 8:12 
AnswerRe: Ajax not working Pin
Not Active5-Aug-09 9:04
mentorNot Active5-Aug-09 9:04 
GeneralRe: Ajax not working Pin
Ersan Ercek5-Aug-09 9:25
Ersan Ercek5-Aug-09 9:25 
GeneralRe: Ajax not working Pin
Abhijit Jana5-Aug-09 9:58
professionalAbhijit Jana5-Aug-09 9:58 
GeneralRe: Ajax not working Pin
Ersan Ercek5-Aug-09 9:59
Ersan Ercek5-Aug-09 9:59 
Questionrelease dates of WCF,AJAX,.. Pin
suni_dotnet5-Aug-09 6:56
suni_dotnet5-Aug-09 6:56 
AnswerRe: release dates of WCF,AJAX,.. Pin
Abhijit Jana5-Aug-09 8:03
professionalAbhijit Jana5-Aug-09 8:03 
QuestionHow to enable folder rw rights in IIS 7.0 for ASP.NET web app? Pin
Chesnokov Yuriy5-Aug-09 4:14
professionalChesnokov Yuriy5-Aug-09 4:14 
AnswerRe: How to enable folder rw rights in IIS 7.0 for ASP.NET web app? Pin
Muhammad Mazhar5-Aug-09 4:29
Muhammad Mazhar5-Aug-09 4:29 
Questiondisplaying column from different tables Pin
srikantha_nagaraj5-Aug-09 4:06
srikantha_nagaraj5-Aug-09 4:06 
AnswerRe: displaying column from different tables Pin
Muhammad Mazhar5-Aug-09 4:40
Muhammad Mazhar5-Aug-09 4:40 
QuestionRe: displaying column from different tables Pin
srikantha_nagaraj5-Aug-09 19:57
srikantha_nagaraj5-Aug-09 19:57 
Questionsearch method Pin
thejakl555-Aug-09 3:50
thejakl555-Aug-09 3:50 
AnswerRe: search method Pin
Muhammad Mazhar5-Aug-09 4:49
Muhammad Mazhar5-Aug-09 4:49 

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.