J
Jeff
Hi
..NET 2.0
I get this compile error:
"not all code paths return a value"
What code path is it talking about here?
Here is my code:
private Comment FindCommentById(Guid id)
{
if (this.Id == id)
return this;
else
{
foreach (Comment comment in Replies)
{
Comment parent = comment.FindCommentById(id);
if (parent != null)
return parent;
else
return null;
}
}
}
..NET 2.0
I get this compile error:
"not all code paths return a value"
What code path is it talking about here?
Here is my code:
private Comment FindCommentById(Guid id)
{
if (this.Id == id)
return this;
else
{
foreach (Comment comment in Replies)
{
Comment parent = comment.FindCommentById(id);
if (parent != null)
return parent;
else
return null;
}
}
}