Sharpdevelop修改局部变量(Sharpdevelop modify local variable)

编程入门 行业动态 更新时间:2024-10-22 20:20:02
Sharpdevelop修改局部变量(Sharpdevelop modify local variable)

在调试/单步执行代码时,如何修改局部变量的值? 它很容易与视觉工作室,但我似乎无法找到如何在sharpdevelop 4.0中做同样的事情

How does one modify the value of a local variable when debugging/stepping through the code? Its easy enough with visual studio but I cannot seem to find out how to do the same thing in sharpdevelop 4.0

最满意答案

对于整数和布尔值等类型,您可以更改“局部变量”窗口(“视图”|“调试”|“局部变量”)中的值。 您可以单击值列并更改变量的值。

在“局部变量”窗口中编辑整型局部变量

对于字符串和引用类型,“局部变量”窗口不支持编辑它们的值。 相反,您可以使用控制台窗口(View | Debug | Console)。 然后,您可以通过编写assign语句并按返回键来更改变量的值。

在控制台窗口中为字符串变量分配新字符串

For types such as integers and booleans you can change the value in the Local variables window (View | Debug | Local variables). You can click into the value column and change the variable's value.

Editing an integer local variable in the Local variables window

For strings and reference types editing their values is not supported in the Local variables window. Instead you can use the Console window (View | Debug | Console). You can then change the variable's value by writing an assign statement and pressing the return key.

Assigning a new string to a string variable in the Console window

更多推荐

本文发布于:2023-08-06 14:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1451233.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   局部   Sharpdevelop   variable   local

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!