Velocity Reviews

Velocity Reviews (
-   ASP .Net (
-   -   Cannot convert from Link to RelatedLink !! (

avecreep 08-06-2008 01:20 PM

Cannot convert from Link to RelatedLink !!

i have the following lines of code:

foreach (Link link in workItem.Links)


RelatedLink relatedLink = link as RelatedLink;
if (relatedLink != null)


WorkItem relatedWorkItem = workItem.Store.GetWorkItem(relatedLink.RelatedWork ItemId);
txtTaskHistory.Text = relatedWorkItem.Id.ToString();



MessageBox.Show("there is a mistake");


When i debug, i see that link is not null, but relatedLink becomes null after the line
RelatedLink relatedLink=link as RelatedLink and displays error message.
Can anyone tell me what is wrong with it?

Thank you..

All times are GMT. The time now is 11:49 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.