I was trying to add multiple enum values to a variable based on conditions. For example, I have something like this:
SharedAccessBlobPermissions t = SharedAccessBlobPermissions.Write | SharedAccessBlobPermissions.Read;
if user has chosen other available enum values on the UI, i want to add them was well. But it looks like we can only write it on one line and can't add multiple values later on.
Any idea how can I achieve this?
[Update] Based on the answers, this is what I wrote
var t= new SharedAccessBlobPermissions();
        if (isAllowRead)
        {
            t = SharedAccessBlobPermissions.Read;
        }
        if (isAllowWrite)
        {
            t |= SharedAccessBlobPermissions.Write;
        }
 
     
     
     
    