Start modernization
# Conflicts: # .gitignore # App.xaml # App.xaml.cs # AudioWatcher.cs # Delcom/DeviceManagement.cs # Delcom/StoplightIndicator.cs # LICENSE.md # LightController.cs # Properties/AssemblyInfo.cs # Properties/Resources.Designer.cs # Properties/Resources.resx # Properties/Settings.Designer.cs # Properties/Settings.settings # README.md # UpdateCheck.cs # WorkIndicator.csproj # WorkIndicator.sln # WorkIndicator.sln.DotSettings
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace WorkIndicator;
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
extension(int i)
|
||||
{
|
||||
public int SetBitValue(int bit, bool value)
|
||||
{
|
||||
if (value)
|
||||
i |= 1 << bit;
|
||||
else
|
||||
i &= ~(1 << bit);
|
||||
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user