1.net代码怎么获取第二行的码搭源码编程器绘画数字字符串
2.Action<SmsData> addData = d => SmsService.AddData(d); å¦ä½ç解ï¼
net代码怎么获取第二行的数字字符串
public static string IgetNumber(string str)
{
return System.Text.RegularExpressions.Regex.Replace(str, @"[^\d{ 2}-]*", "");
}
public static void Main()
{
string a=IgetNumber("武汉房权证字号第-号");
string b=IgetNumber("武汉房权证字号第号");
Console.WriteLine(a);
Console.WriteLine(b);
}
Action<SmsData> addData = d => SmsService.AddData(d); å¦ä½ç解ï¼
å æ解å¦ä¸ï¼
d => SmsService.AddData(d); //转æ¢ä¸
public void temp(SmsData d)
{
SmsService.AddData(d);
}
ä¸èè线ç¨å®å ¨ï¼å次翻è¯ï¼
Action<SmsData> addData = temp;
addData(obj);
public void temp(SmsData d)
{
SmsService.AddData(d);
}
çç¥äºä¸ä¸ªå½æ°ï¼ç¨Lamada表达å¼åç è¿ç§åæ³å¾é¿è§ åé¢ä½ å¨ç¼ç¨çæ¶åè½çå°ä¸å°
è¿ä¸ªæ¯ä¸ä¸ªå§æï¼å¨ä½¿ç¨ Action<T> å§ææ¶ï¼ä¸å¿ æ¾å¼å®ä¹ä¸ä¸ªå°è£ åªæä¸ä¸ªåæ°çæ¹æ³çå§æã
å®ä¹ï¼
public delegate void Action<in T>(T obj)//ç解ææ³åçã
DEMO:
using System;
using System.Windows.Forms;
public class TestAction1
{
public static void Main()
{
Action<string> messageTarget;
if (Environment.GetCommandLineArgs().Length > 1)
messageTarget = ShowWindowsMessage;
else
messageTarget = Console.WriteLine;
messageTarget("Hello, World!");
}
private static void ShowWindowsMessage(string message)
{
MessageBox.Show(message);
}
}
2024-12-29 15:49719人浏览
2024-12-29 14:451150人浏览
2024-12-29 14:111173人浏览
2024-12-29 14:032784人浏览
2024-12-29 14:021742人浏览
2024-12-29 13:421527人浏览
近期,水产品消费进入旺季。为维护水产品市场经营秩序,近日,北京市丰台区市场监管局在辖区开展夏季水产品市场专项检查。此次检查重点排查经营者是否持有相关证照,检查水产品进货来源,以及经营者是否履行进货查验
1.app拉新一手渠道商怎么找?盘点app推广拉新地推项目平台!2.App拉新多种运营模式和什么是优质渠道商讲解3.地推拉新app推广接单平台,2022年地推拉新项目app拉新一手渠道商怎么找?盘点a