В строках ниже:
//Folder.Attributes = FileAttributes.Directory | FileAttributes.Hidden | FileAttributes.System | FileAttributes.ReadOnly;
Folder.Attributes |= FileAttributes.Directory | FileAttributes.Hidden | FileAttributes.System | FileAttributes.ReadOnly;
Folder.Attributes |= ~FileAttributes.System;
Folder.Attributes &= ~FileAttributes.System;
Что означает |=(один канал равен) и &=(один амперсанд равен) означает в C #
Я хочу удалить системный атрибут, сохранив остальные ...
x = x | (y);это лучший способ описать это, потому чтоx |= y + z;это не то же самое, чтоx = x | y + z;