如何在ac #project中添加命名空间?我是初学者.
if(!string.IsNullOrEmpty(result))
{
CoderBuddy.ExtractEmails helper = new CoderBuddy.ExtractEmails(result);
EmailsList = helper.Extract_Emails;
}
Run Code Online (Sandbox Code Playgroud)
我的Form1需要使用以下命名空间:
// this is the file that I need to add
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace Coderbuddy
{
public class ExtractEmails
{
private string s;
public ExtractEmails(string Text2Scrape)
{
this.s = Text2Scrape;
}
public string[] Extract_Emails()
{
string[] Email_List = new string[0];
Regex r = new Regex(@"[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}", RegexOptions.IgnoreCase);
Match m;
//Searching for the text that matches the above regular expression(which only matches email …Run Code Online (Sandbox Code Playgroud) 如何查看以下查询返回的行数?
mysql_select_db($database_aoldatabase, $aoldatabase);
$query1 = "select * from sale where secid = $invoiceno ";
$query2 = "select * from sale where secid = $invoiceno ";
$maxa = mysql_query ($query1)
or die ("Query '$query' failed with error message: \"" . mysql_error () . '"');
$maxa2 = mysql_query ($query2)
or die ("Query '$query' failed with error message: \"" . mysql_error () . '"');
$row = mysql_fetch_array($maxa);
$row2 = mysql_fetch_array($maxa2);
Run Code Online (Sandbox Code Playgroud) 排队
urls[i] = Reader.GetValue(i).ToString();
Run Code Online (Sandbox Code Playgroud)
它说错误1当前上下文中不存在名称"i"
我该怎么办呢
private void Form1_Load(object sender, EventArgs e)
{
string MyConString = "SERVER=192.168.0.78;" +
"DATABASE=webboard;" +
"UID=aimja;" +
"PASSWORD=aimjawork;" +
"charset=utf8;";
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
MySqlDataReader Reader;
command.CommandText = "SELECT url FROM `listweb` WHERE `url` IS NOT NULL AND ( `webbordkind` = '¿¿¿¿¿¿¿¿¿¿¿¿' ) and `nourl`= 'n' order by province, amphore limit 4 ";
connection.Open();
Reader = command.ExecuteReader();
string[] urls = new string[2];
string thisrow = "";
string sumthisrow = ""; …Run Code Online (Sandbox Code Playgroud)