C#相关内容
嗨, 我编写了以下代码: using System; using System.Collections; namespace ArrayList1 { class Program { ArrayList a1 = new ArrayList(); static void Main(string[] args) {
..
How can I write a code in C# I can create a game which is a matrix of points and then connect these points with lines and each box is composed of those lines recorded to the player. 我尝试过的事情: 用c#
..
我可以单击框列表中的一项,例如ID.姓名 .在Tx Box中显示数据库中的手机号码. 我尝试过的事情: private void listBox1_Click(object sender, EventArgs e) { int id = Convert.ToInt32(listBox1.Text); string query = "sele
..
我有一些无法运行的代码.我已经提交了代码以供审核.预先感谢您的帮助.
使用系统;
使用 System.Collections.Generic;
使用 System.Linq;
使用 System.Text;
使用使用System.Threading.Tasks;
使用使用System.Threading;
命名空间 IT481_Unit6_Assignment
{
使用系 ..
如何合并字节格式 string s = textBox1.Text; byte[] bytes = Encoding.ASCII.GetBytes(s); //byte[] bytesToSend = new byte[16] { 0x01, 0x46, 0x42, 0x44, 0x2d, 0x2d, 0x2d, 0x
..
问题1 => 我正在打印客户收据,但是当我添加超过20种产品时,它会生成新页面,并且第一页的标题也会显示在新页面中,但是我希望它在新页面中仅显示产品详细信息,标题仅显示第一页,请告诉我该怎么办. 问题2 => 当添加多于1页时,我使用热敏打印机进行打印,问题是它仅打印第一页并跳过其他页.但是我希望它在仅打印的一页中打印所有大于1页的页.通过热敏打印机. 问题编号=> 当我添加
..
大家好, 我想像这样使用三元运算符,但是它不起作用. var itemToRemove = myCollection.Any(p = > p!= 空).FirstOrDefault(); itemToRemove!= 空? myCollection.Remove(itemToRemove); // 此文件无法编译! 解决方案 这里有两个问题: 1)Any返回一个bool,
..
public static string ExportToCSV(DataTable dt, string path, string Filename) { try { string OutputMsg = ""; if (string.IsNullOrEmpty(path))
..
Am的数据表中充满了从数据库中获取的值...(字段为SID,SNAME) 从该数据表中,我只需要选择几行...例如,我需要选择包含(101,102,109)中的SID的行.. 建议我使用Sql之类的IN关键字从数据表中获取这些数据... 我不知道如何?帮助我 解决方案 如何使用IN [ ^ ] 您可能想考虑对回答您问题的人表示赞赏. Wes Aday 给IN的参考
..
这是代码. 我想在其他班级获得mManagementPort! class GetConfig 公共 结构 structManagementPort { 公共 UInt16 PortFrom; public UInt16 PortTo; public structManagem
..
我在列表产品ID中有一个产品ID的列表; 我想在IN子句中的asp.net c#查询格式中使用它. 我尝试过的事情: 我可以将其转换为单个字符串形式的逗号分隔值列表,并在如下所示的查询中使用. 例如 “从SELECT中选择*,其中empID在(" + strProductID +“)中"; 并使用DataReader我可以执行查询,但是我又不能直接在不安全的查询中使用此"str
..
..
我正在使用Regex.Split将我的字符串拆分为: 字符串 str = " ; 字符串 [] result = Regex.Split(str," ); 但它不是拆分..当我尝试按#拆分时,它可以工作. 我尝试过的事情: 字符串 str = " ; 字符串 [] result = Regex.Split(str," ); ; 字符串 [] result = Regex.
..
Using the GET method to show banks from the DB in the DataGridview but it doesn''t show anything. Why? 我尝试过的事情:
namespace BankData
{
[Newtonsoft.Json.JsonObject("ResultData")]
public ..
如何捕获SqlBulkCopy异常或问题记录.我正在使用以下代码. private string writetotbl(IList records) { string connString = ConfigurationManager.ConnectionStrings["myDBConnString"].ConnectionString; try
..
我正在尝试将单元格中的值发送到复选框,但是当我选中复选框为空时,有人知道如何提供帮助吗? 代码是 Ops.checkedListBox1.Items.Add(this.CustOrdersDGV.CurrentRow.Cells[10].Value); 我尝试过的事情: Ops.checkedListBox1.Items.Add(this.CustOrdersDGV.Curren
..
在一种形式中,我有一个datagridview,其中包含我的xml文件的内容.我在单元格上单击鼠标右键打开一个弹出设置窗口.弹出设置窗口是另一种形式. 我已经编写了用于打开弹出式设置窗口表单的代码.但它显示在屏幕的最上方.如何在datagridview中的currentcell下方设置弹出设置窗口窗体的位置. 我尝试过的事情: 私有 无效 dataGridView1_CellMo
..
嘿, 我正在用Visual C#制作桌面应用程序,而该应用程序是Blister Inspection System.我想根据画框上的水泡制作图纸.为此,我必须根据用户输入绘制多个矩形,用户输入就像行和列的数量一样,如果假设用户输入2和3,则矩形应以2 * 3的方式绘制.我也想保持每个绘制的矩形之间的关系.有人可以帮助我吗? 谢谢 我尝试过的事情: 公共列表
..
如果(cn.State == ConnectionState.Open) { cn.Close(); } cn.Open(); listView1.Clear(); ImageList图片= 新 ImageList(); i
..
Datetimepicker value Conversion failed when converting date and/or time from character string while inserting datetime 我尝试过的事情: string saveStaff = "INSERT into dbo.table (name, datum) VALUES (''
..