C# Passing color into a method.

  • C/++/#
  • Thread starter kiwijoey
  • Start date
  • #1
2
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?
 

Answers and Replies

  • #2
613
155
that should do it
 

Related Threads on C# Passing color into a method.

Replies
16
Views
4K
  • Last Post
Replies
8
Views
42K
  • Last Post
Replies
6
Views
10K
Replies
2
Views
10K
Replies
6
Views
6K
  • Last Post
Replies
29
Views
68K
  • Last Post
2
Replies
64
Views
4K
Replies
5
Views
4K
  • Last Post
Replies
10
Views
44K
Replies
5
Views
23K
Top