kangalert

Array []aryValue;

aryField = mFieldList.Split("|*");

for(intLoop = 0; intLoop <= tmp;intLoop ++)

{

arrField[intLoop];

}

How can i assign a split value into the array

-----------------------------------------------------------------------------------------------------------------------------

public enum DataType

{

DBInt = 1,

DBString = 2,

DBDatetime = 3,

DBLong = 4,

DBDouble = 5

};

public void addItem(string strFieldName, string strFieldValue, DataType intFieldType)

{

if (intFieldType = DataType.DBString || intFieldType = DataType.DBDatetime)

......

}

Error Message :

Error 4 Operator '&&' cannot be applied to operands of type 'Cor_DB.clsDB.DataType' and 'string' D:\Cor_DB\clsDB.cs 78 39 Cor_DB

do any one know how to resolve it



Re: Visual C# Language C# Logic error.

Matthew Watson

>> if (intFieldType = DataType.DBString || intFieldType = DataType.DBDatetime)

You've used the assignment operator ('=') instead of the comparison operator ('==').

Change the = to ==