- Joined
- May 27, 2008
- Messages
- 3,629 (0.59/day)
System Name | Ultra 64 |
---|---|
Processor | NEC VR4300 (MIPS R4300i) |
Motherboard | proprietary design |
Cooling | Fanless aircooled |
Memory | 4.5MB 250 MHz RDRAM |
Video Card(s) | 62.5 MHz Reality Coprocessor |
Storage | 32 - 512 Mbit ROM Cartridge |
Display(s) | 720x576 |
Case | Clear Blue Funtastic |
Audio Device(s) | 16-bit CD quality |
Power Supply | proprietary design |
Mouse | N64 mouse for use with N64DD |
Keyboard | N64 keyboard for use with N64DD |
Right i have a class with a custom variable.
My variable is declared in a separate file named results.cs
In my main programme i have two instances of this variable declared;
Due to the logic of my programme and how it un-serialises its input i need a half way house in the form of the single tempory2 before i can then put the complete data into the list tempory.
Then when a needed condition is met its simply a case of
For the first element of the list tempory it works grand and stores the correct data. However after that all previous elements of the current element being entered are overwritten by the values of the current element.
for example tempory[0] = 1;
tempory[1]=2;
tempory[2]=3;
instead of tempory returning, 1,2,3
it returns 3,3,3
I think i may be putting a reference to tempory2 in tempory so every element will only return the current value for tempory instead of storing the actual value of tempory2.
Hope all this makes sense if you need access to any more code and hows its used please ask.
Note i chopped allot of the logic out of my programme as the list tempory is not being accessed anywhere other then where ive posted with the tempory.Add() and to be returned.
My variable is declared in a separate file named results.cs
Code:
namespace teamCityBlunt.domain
{
public class Results
{
public int Id { get; set; }
public string Number { get; set; }
public string TrigTime { get; set; }
public int Count { get; set; }
public string branch { get; set; }
public string Status { get; set; }
public string BuildtypeID { get; set; }
public string BranchNAme { get; set; }
public DateTime StartDate { get; set; }
public int MaxResults { get; set; }
public string href { get; set; }
public string weburl { get; set; }
}
}
In my main programme i have two instances of this variable declared;
Code:
namespace teamCityBlunt.domain
{
class TCResponse
{
public static ResultsWrapper tcResponse(string Response = null)
{
List<domain.Results> tempory = new List<domain.Results>();
domain.Results tempory2 = new domain.Results();
}
}
}
Due to the logic of my programme and how it un-serialises its input i need a half way house in the form of the single tempory2 before i can then put the complete data into the list tempory.
Then when a needed condition is met its simply a case of
Code:
tempory.Add(tempory2);
For the first element of the list tempory it works grand and stores the correct data. However after that all previous elements of the current element being entered are overwritten by the values of the current element.
for example tempory[0] = 1;
tempory[1]=2;
tempory[2]=3;
instead of tempory returning, 1,2,3
it returns 3,3,3
I think i may be putting a reference to tempory2 in tempory so every element will only return the current value for tempory instead of storing the actual value of tempory2.
Hope all this makes sense if you need access to any more code and hows its used please ask.
Note i chopped allot of the logic out of my programme as the list tempory is not being accessed anywhere other then where ive posted with the tempory.Add() and to be returned.