C# Passing color into a method.

  • C/++/#
  • Thread starter kiwijoey
  • Start date
  • #1
2
0

Main Question or Discussion Point

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
harborsparrow
Gold Member
528
104
that should do it
 

Related Threads for: C# Passing color into a method.

Replies
16
Views
3K
  • Last Post
Replies
8
Views
41K
  • Last Post
Replies
6
Views
9K
Replies
5
Views
21K
Replies
2
Views
2K
  • Last Post
2
Replies
29
Views
67K
Replies
2
Views
10K
Replies
2
Views
628
Top