Hello,
I have an if statement where I want it to be true if two or more conditions = true. I tried using the && operator but VS2012 just complains stating that;
Error 1 Operator '&&' cannot be applied to operands of type 'bool' and 'Microsoft.Exchange.WebServices.Data.DelegateFolderPermissionLevel'
I have tried three ways:
if (item.Permissions.CalendarFolderPermissionLevel != DelegateFolderPermissionLevel.Editor && item.Permissions.InboxFolderPermissionLevel != DelegateFolderPermissionLevel.Editor)
{
item.Permissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
}
And
if (item.Permissions.CalendarFolderPermissionLevel && item.Permissions.InboxFolderPermissionLevel != DelegateFolderPermissionLevel.Editor)
{
item.Permissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;
}
and
if (item.Permissions.CalendarFolderPermissionLevel && item.Permissions.InboxFolderPermissionLevel != DelegateFolderPermissionLevel.Editor){
item.Permissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevel.Editor;}
Could not find anything useful on the net. How would I go about writing such a statement? It works fine with just the one statement..
Many Thanks in advance.
Kind Regards
Mikell