我试图在ICSharpCode TextEditor中选择文本行.以及使文本框转到特定行.该应用程序是在Windows 2010中使用C#构建的Windows窗体应用程序.
我使用文本编辑器的原因是代码突出显示和行号等.
我真的没有太多使用Windows窗体的经验,所以任何帮助将不胜感激.我的守则如下:
textEditorControl.Text = "long file string with line breaks";
textEditorControl.VRulerRow = 10; //Example row selection
Run Code Online (Sandbox Code Playgroud) 最近我正在学习价值类型,我有点困惑.同时,转换和拆箱都使用相同的语法 - (预期类型)(对象),对吧?那么类型之间的简单转换呢,即转换或转换?
int x = (int)2.5; //casting?
object a=x;
int Y=(int)a; //unboxing I think
Random r=new Random();
object X=r;
Random R=(Random)X; // casting
Run Code Online (Sandbox Code Playgroud) 在其他语言中,调用函数时可以选择要传递的参数.
所以举个例子
int cookMeth(x=0,y=0,z=0){...}
cookMeth(z=123);
Run Code Online (Sandbox Code Playgroud)
我的问题是,js有可能吗?它似乎不是,但这样做的替代方法或技术是什么?