C# Passing color into a method.

  • Context: C# 
  • Thread starter Thread starter kiwijoey
  • Start date Start date
  • Tags Tags
    Color Method
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 6K views
kiwijoey
Messages
2
Reaction score
0
How would you go about passing a color into a C# method and using that color inside the method to create a new pen? Assuming everything else is defined

Is it MethodName(Color color)
Graphics pen1 = new Pen(color.Color,1);



or is it something completely different?
 
Physics news on Phys.org
that should do it