算法C#.NET
滨江区长河路1401号白金海岸农贸市场干货区7053号
像这样的字符串,我只想提取1401,该怎么办。有很多类似的。我只想要第一个数值。
还有这个。
苍南县龙港镇柳江路2-16号一单元401室
这个我想提取第一个2,怎么办呢
安吉县昌硕街道天目北路316、318号
这个提取316
滨江区长河街道滨康路399号D区58-59号
这……继续阅读 »
11年前 (2015-03-31) 1579浏览 0评论
0个赞
10转换为#A,17转换为11。(不足2位高位补#)
1分
String strA = a.ToString(“x8”);
自己根据结果加 #
37分
int a = 10;
string s = a.ToString("X").PadLeft……继续阅读 »
11年前 (2015-03-30) 1240浏览 0评论
0个赞
linq?to?xml注释xml
var configers =
(from config in XDoc.Descendants(“configuration”).Descendants(“appSettings”).Descend……继续阅读 »
11年前 (2015-03-30) 1773浏览 0评论
0个赞
服务器端用的是windows 2003 Server
private void StartListening()
{
try
{
//指定的IP地址和端口上是否有传入的连接尝试
myListener =……继续阅读 »
11年前 (2015-03-30) 4162浏览 0评论
0个赞
Devexpress内的GridControl如何使得单元格处于编辑状态,即类似DataGridView的BeginEdit,此时光标位于当前单元格,开始闪烁。
5分
在run designer 中设置列的属性 allowEdit 设置为true
15分
gridView1.FocusedC……继续阅读 »
11年前 (2015-03-30) 4443浏览 0评论
0个赞
SQLselectpivot
declare @s nvarchar(4000)
Select @s=isnull(@s+",","")+quotename([DutyDate])
from DutyInfo group by [DutyDate]
exec("select * from DutyInfo pivot (max([……继续阅读 »
11年前 (2015-03-29) 2579浏览 0评论
0个赞
XElement xe = XElement.Load(xmlFilePath);
IEnumerable<XElement> element = from item in xe.Descendants(“ThemeName”)
……继续阅读 »
11年前 (2015-03-29) 2464浏览 0评论
0个赞
winformstring类classvs
下面代码是创建一个TextBoxEx类,并增加了一个string类型的属性Msg
public class TextBoxEx : TextBox
{
private string msg = “”;
public string Msg
……继续阅读 »
11年前 (2015-03-29) 2822浏览 0评论
0个赞
xml序列化
Xml序列化生成的代码是没有样式表引用的,我想添加一个样式引用,所以这样写:
using (StreamWriter streamWriter = new StreamWriter(fileName, false))
{
usin……继续阅读 »
11年前 (2015-03-29) 1640浏览 0评论
0个赞