Reporter | Wolfram Bernhardt (wolfram_bernhardt) |
---|---|
Created | Feb 8, 2012 4:01:49 PM |
Updated | Feb 8, 2012 4:01:49 PM |
Priority | Normal |
Type | Unspecified |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
@inherits System.Web.Mvc.WebViewPage<dynamic>
@{
ViewBag.Title = String.Join(" - ", new String[]
{
@Resources.Views.Shared.Layout.Title,
@Resources.Views.Manual.Shared.UserManual,
@Resources.Views.Manual.Shared.AppleI
});
}
R# (latest) reports errors for the three @Resources.Views... - lines,
saying "cannot convert expression of type 'void' to type 'string'"
Of course the ..Designser.cs-files that were generated from the resource-files return strings in every case.
When you remove the "String" from "String[]", the error disappears:
@inherits System.Web.Mvc.WebViewPage<dynamic>
@{
ViewBag.Title = String.Join(" - ", new[]
{
@Resources.Views.Shared.Layout.Title,
@Resources.Views.Manual.Shared.UserManual,
@Resources.Views.Manual.Shared.AppleI
});
}
When you write the @Resource in one line, the error disappears for the second and third part
@inherits System.Web.Mvc.WebViewPage<dynamic>
@{
ViewBag.Title = String.Join(" - ", new String[]
{
@Resources.Views.Shared.Layout.Title, @Resources.Views.Manual.Shared.UserManual, Resources.Views.Manual.Shared.AppleI });
}
Greetz,
Wolfram
@{
ViewBag.Title = String.Join(" - ", new String[]
{
@Resources.Views.Shared.Layout.Title,
@Resources.Views.Manual.Shared.UserManual,
@Resources.Views.Manual.Shared.AppleI
});
}
R# (latest) reports errors for the three @Resources.Views... - lines,
saying "cannot convert expression of type 'void' to type 'string'"
Of course the ..Designser.cs-files that were generated from the resource-files return strings in every case.
When you remove the "String" from "String[]", the error disappears:
@inherits System.Web.Mvc.WebViewPage<dynamic>
@{
ViewBag.Title = String.Join(" - ", new[]
{
@Resources.Views.Shared.Layout.Title,
@Resources.Views.Manual.Shared.UserManual,
@Resources.Views.Manual.Shared.AppleI
});
}
When you write the @Resource in one line, the error disappears for the second and third part
@inherits System.Web.Mvc.WebViewPage<dynamic>
@{
ViewBag.Title = String.Join(" - ", new String[]
{
@Resources.Views.Shared.Layout.Title, @Resources.Views.Manual.Shared.UserManual, Resources.Views.Manual.Shared.AppleI });
}
Greetz,
Wolfram