Using MVC I am passing a Projects
list to the view.
@if (Model.Projects != null && Model.Projects.Count > 0)
{
<fieldset>
<table class="items" summary="@T("This is a table of the delivery Runs in your application")">
<colgroup>
}
else
{
//no data available
}
Model.Projects.Count > 0 is saying:
operator > cant be applied to operands of type 'method group' and 'int'
how about
Model.Projects.Count() > 0
or
Model.Projects.Any()
if you are using resharper, it will recommend you for Model.Projects.Any()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With