transacted.asmx
来自「东软内部材料(四)asp等相关的教学案例 」· ASMX 代码 · 共 23 行
ASMX
23 行
<%@ WebService Language="C#" class="Fibonacci"%>
using System.Web.Services;
using System.EnterpriseServices;
public class Fibonacci : WebService
{
[WebMethod(TransactionOption=TransactionOption.RequiresNew)]
public int GetSeqNumber(int fibIndex){
if (fibIndex < 2)
return fibIndex;
int[] FibArray = {0,1};
for (int i = 1; i< fibIndex; i++){
FibArray[1] = FibArray[0] + FibArray[1];
FibArray[0] = FibArray[1] - FibArray[0];
}
return FibArray[1];
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?