我写了下面的代码来找出丢失的序列,但我收到错误,因为我提到这是我的代码
public partial class Missing : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
List<int> daysOfMonth =
new List<int>() { 6, 2, 4, 1, 9, 7, 3, 10, 15, 19, 11, 18, 13, 22, 24, 20, 27, 31, 25, 28 };
Response.Write("List of days:");
foreach (var num in daysOfMonth)
{
Response.Write(num);
}
Response.Write("\n\nMissing days are: ");
// Calling the Extension Method in the List of type int
foreach (var number in daysOfMonth.FindMissing()){Response.Write(number);}
}
public static IEnumerable<int> FindMissing(this List<int> list) …Run Code Online (Sandbox Code Playgroud) 大家好我正在做一个程序来舍入在文本框中输入的文本.样本输入
Entered value output value
100 100.00
50 50.00
Run Code Online (Sandbox Code Playgroud)
像这样我想在textBox1_Leave事件上格式化我的文本框值
我试过这个,但对我不起作用
private void textBox1_Leave(object sender, EventArgs e)
{
string str = string.Format(textBox1.Text, "##.00");
textBox1.Text = str;
}
Run Code Online (Sandbox Code Playgroud)
谁能帮我
嗨所有我想尝试动态添加一个图像Label,如下工作正常,但我想添加一个space后的图像,我想写mt所需的文本我尝试如下,但我无法找到图像之间的空间和文字
Label1.Text = "<img src='Images/warning (1).png' />Select atleast one?";
Run Code Online (Sandbox Code Playgroud)
我需要图像后面的空格(标签空间)
我现在的如下
