TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manu xaml
NA
19
0
cannot convert type 'char'
Apr 16 2009 2:34 PM
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)) ;
}
}
Reply
Answers (
1
)
Just a Little Bit in a dilemma as to which book to buy for WPF
building SDI type application using WPF and XAML