에 대한 브러쉬 변수를 선언 I 현재 다음과 같은 방법 그러나입력
public void printTitle(string title){
// settings for stringformat
g.DrawString(title, drawFontTitle, Brushes.White, x, y, stringFormatTitle);
}
, 내가 입력과 같이, 제목의 색상을 정의 할 수 있도록 노력하고 있습니다
public void printTitle(string title, Brushes titleColor){
// settings for stringformat
g.DrawString(title, drawFontTitle, titleColor, x, y, stringFormatTitle);
}
그리고 다음과 같이 사용됩니다 :
printTitle("Title Text", Brushes.White);
그러나, 내가 생각하는 오류의 원인이되는 Brushes titleColor
을 신고 할 때 문제가 발생합니다. 대신이 작동
public void printTitle(string title, Brushes titleColor)
{
// settings for stringformat
g.DrawString(title, drawFontTitle, titleColor, x, y, stringFormatTitle);
}
그래서 이것을 사용 :
오류가 무엇입니까? – Jason
당신 (그리고 다른 사람들)은 당신의 이름 옆에있는 [편집 한 ... 이전]] (http://stackoverflow.com/questions/21192097/revisions) 링크를 클릭하여 편집 한 사람을 볼 수 있습니다. 그래서 감사와 다른 소음을 추가 할 필요가 없습니다. ;-) – rene