Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
cannot convert type 'char'
Manu xaml
Apr 16 2009 2:34 PM
7.6k
Reply
The line where I get the error is the following (bottom of cod)
correctionsManager.DeleteCorrectionsForInspection(differentItems[1].Trim(), currentJob.JobID)) ;
differentItems[1].Trim() contains just some text e.g. "This is me" why am I getting this error then and how can I pass it to my .cs file?
Thanks
Em
private void cmdRemove_Click(object sender, RoutedEventArgs e)
{
for (int i = 0; i < lstViolationCodesSelected.SelectedItems.Count; i++)
{
string[] differentItems = lstViolationCodesSelected.SelectedItems[i].ToString().Split('^');
if (differentItems[1].IndexOf(" (AD_HOC)") > 0)
{
if (selectedCodesDescription.Contains(differentItems[1]))
{
selectedCodesDescription.RemoveAt(i);
}
}
if (selectedCodesText.Contains(differentItems[1].Trim()))
{
//Remove also from checkboxes
selectedCodesText.Remove(differentItems[1].Trim());
selectedCodes.Remove(differentItems[0].Trim());
lstViolationCodesSelected.Items.Remove(lstViolationCodesSelected.SelectedItems[i]);
}
selectedCodesText.Remove(differentItems[1].Trim());
lstViolationCodesSelected.Items.RemoveAt(lstViolationCodesSelected.Items.IndexOf(lstViolationCodesSelected.SelectedItems[i]));
txtDisplay.Text = "";
//Do the update in the Database // GetCorrectionsForInspection " + currentJob.JobID + "
// GOOD CODE foreach (Corrections cor in correctionsManager.DeleteCorrectionsForInspection(currentJob.JobID))
// btn.Uid.ToString()
MessageBox.Show("You have just selected " + differentItems[1].Trim() + " " + currentJob.JobID);
foreach (Corrections cor in correctionsManager.DeleteCorrectionsForInspection(differentItems[1].Trim(), currentJob.JobID)) ;
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Just a Little Bit in a dilemma as to which book to buy for WPF
building SDI type application using WPF and XAML