-
Notifications
You must be signed in to change notification settings - Fork 0
Interrupter.constructor
BelicusBr edited this page Feb 5, 2024
·
1 revision
Interrupter Constructor
Namespace: Cobilas
Only one switch specifying the index will be used, the others will remain at false value.
Interrupter(int, bool) | Only one switch specifying the index will be used, the others will remain at false value. |
Interrupter(int) | Only one switch specifying the index will be used, the others will remain at false value. |
Only one switch specifying the index will be used, the others will remain at false value.
int Capacity
How many switches.
bool UseASwitch
Allows you to use one switch at a time.
using Cobilas;
static void example() {
Interrupter interrupter = new Interrupter(5, false);
interrupter[0] = true;
interrupter[3] = true;
Console.WriteLine($"interrupter1\r\n{interrupter}");
interrupter = new Interrupter(5, true);
interrupter[0] = true;
interrupter[3] = true;
Console.WriteLine($"interrupter2\r\n{interrupter}");
}
/*
interrupter1
Switches {
switch(0)[status:true]
switch(1)[status:false]
switch(2)[status:false]
switch(3)[status:true]
switch(4)[status:false]
}
interrupter2
Switches {
switch(0)[status:false]
switch(1)[status:false]
switch(2)[status:false]
switch(3)[status:true]
switch(4)[status:false]
}
*/
Only one switch specifying the index will be used, the others will remain at false value.
By default the UseASwitch
property is true
.
int Capacity
How many switches.
using Cobilas;
static void example() {
Interrupter interrupter = new Interrupter(5);
interrupter[0] = true;
interrupter[3] = true;
Console.WriteLine($"interrupter1\r\n{interrupter}");
}
/*
interrupter1
Switches {
switch(0)[status:false]
switch(1)[status:false]
switch(2)[status:false]
switch(3)[status:true]
switch(4)[status:false]
}
*/