Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

system.drawing.color to system.consolecolor

int index = (c.R > 128 | c.G > 128 | c.B > 128) ? 8 : 0;
                index |= (c.R > 64) ? 4 : 0; 
                index |= (c.G > 64) ? 2 : 0; 
                index |= (c.B > 64) ? 1 : 0; 
                Console.ForegroundColor = (System.ConsoleColor)index;
Comment

PREVIOUS NEXT
Code Example
Csharp :: 405 - HTTP verb used to access this page is not allowed 
Csharp :: C# how to know if number is even or odd 
Csharp :: how to set the current user httpcontext.current.user asp.net -mvc 
Csharp :: rows and columns arrays 
Csharp :: write last line txt file c# 
Csharp :: c# file to byte array 
Csharp :: net user add ne user windows 10 
Csharp :: c# datagridview cell align center 
Csharp :: select many vs select 
Csharp :: c# read excel file columns using epplus 
Csharp :: c# get private property 
Csharp :: oncollisionenter2d 
Csharp :: c# read string 
Csharp :: c# string length 
Csharp :: Get replace normal text from word document in C# 
Csharp :: c# WriteLine() 
Csharp :: install active directory windows server 2019 powershell 
Csharp :: c# if else 
Csharp :: excel rows count 
Csharp :: if else c# 
Csharp :: sqlite execute 
Csharp :: Create a list of 3 Orders c# 
Csharp :: jobject alternative in system.text.json 
Csharp :: wpf binding to static property in code behind 
Csharp :: difference between iqueryable and ienurable 
Csharp :: linq query to fetch parent child data from same table in c# 
Csharp :: how to change the color of a single line of code in c# 
Csharp :: dictionary plus generic class c# 
Csharp :: psobject get service name 
Csharp :: How to create a gameobject by code 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =