例子,asp.net中函数返回参数和调用实例。
一、接收 read.aspx.cs调用
string cpuInfo = Read.Pro();
二、返回函数,建立一个:read.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Management;
using System.Management.Instrumentation;
/// <summary>
/// read 的摘要说明
/// </summary>
///
public class Read
{
public Read() { }
public static string Pro()
{
return "ok!";
}
}