Horje
get index Brushes properties C# Code Example
get index Brushes properties C#
private Brush PickBrush()
{
    Brush result = Brushes.Transparent;

    Random rnd = new Random();

    Type brushesType = typeof(Brushes);

    PropertyInfo[] properties = brushesType.GetProperties();

    int random = rnd.Next(properties.Length);
    result = (Brush)properties[random].GetValue(null, null);

    return result;
}
get index Brushes properties C#
Random rnd = new Random();
Brush brush = brushes[rnd.Next(brushes.Length)];




Csharp

Related
c# regex extract string between brackets Code Example c# regex extract string between brackets Code Example
JsonConvert.DeserializeObject options camelcasing c# .net Code Example JsonConvert.DeserializeObject options camelcasing c# .net Code Example
C# USING SHARED CLASS Code Example C# USING SHARED CLASS Code Example
deserialize list of objects c# Code Example deserialize list of objects c# Code Example
set custom default file in startup Code Example set custom default file in startup Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9