2016-06-10 3 views
-1

VB 코드를 C#으로 변환했습니다.VB를 C로 변환하는 중 오류가 발생했습니다

이제 코드가 일부 줄에 오류를 던지고 있습니다. 누군가이 문제를 해결하는 방법을 알려주는 데 도움을 줄 수 있습니까?

_with16.ConcaveColor = System.Drawing.ColorTranslator.FromOle(Interaction.GetSetting(My.Application.Info.Title, "ProfileViewPlotOptions", "BackColor", System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Lime).ToString())); 
_with22.Acceleration = Convert.ToDouble(Interaction.GetSetting(My.Application.Info.Title, "FTS1000", "Acceleration", Convert.ToString(200000))); 

은 지금까지 내가 이해할 수있는, "내" 키워드는 C#에서 지원되지 않습니다. 사용할 수있는 대안이 있습니까

+0

가'MyApplication.Info'을보십시오. –

+0

doent가 작동하는 것 같습니다 – Apoorv

+0

실제로 어떤 오류가 있습니까? –

답변

1

My은 Visual Basic 것입니다. 만 두 줄이 문제를 제공하는 경우에 그것을 대체 할 수

var title = ((AssemblyTitleAttribute) System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0]).Title; 

_with16.ConcaveColor = System.Drawing.ColorTranslator.FromOle(Interaction.GetSetting(title, "ProfileViewPlotOptions", "BackColor", System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Lime).ToString())); 
_with22.Acceleration = Convert.ToDouble(Interaction.GetSetting(title, "FTS1000", "Acceleration", Convert.ToString(200000))); 

My.Application.Info.TitleAssemblyTitleAttributeTitle의 값을 제공 (MSDN은 herehere 링크)

+0

그게 내가 선생님을 찾고있는 것. 확인하겠습니다. – Apoorv

+0

오류가 발생합니다. System.Array does not는 "제목"에 대한 정의를 구성합니다. – Apoorv

+0

죄송합니다, 편집을 참조하십시오. 나는 내 전화에있어 열심히 증명하고있다. – Jcl

관련 문제