As shown, set up the cycle began to end time, calculated the whole process took 0.8 seconds, normal items. Add 1 w loop only about 0.0015 seconds is enough, could you tell me why so much difference?
This is a member of the class code in the linkerData set
Public class DataLinker: IComparable
{
String linker_name="contact 1";
String linker_ID="0000001";
Int call_type=1;
Int linker_about=0;
Int contact_index=0;
Public int Contact_Index
{
The get {return contact_index; }
The set {contact_index=value; }
}
Public void CLone (DataLinker link)
{
Contact_Index=link. Contact_Index;
Linker_about=link. Linker_about;
Linker_ID=link. Linker_ID;
Linker_name=link. Linker_name;
Call_type=link. Call_type;
}
Members of the # region IComparable
Public int CompareTo (object obj)
{
DataLinker p=obj as DataLinker;
If (p==null)
{
Throw new NotImplementedException ();
}
Return to this.contact_index.Com pareTo (p.c ontact_index);
}
# endregion
Public string Linker_name
{
The get
{
Return linker_name;
}
Set
{
Linker_name=value;
}
}
//,,, the rest is attribute encapsulation
CodePudding user response:
From the top, please give directions!!!!!!CodePudding user response:
Date subtraction to calculate time, plus this is not you add is to add two once you seeCodePudding user response: