⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fibonaccisoap.asmx

📁 东软内部材料(四)asp等相关的教学案例 
💻 ASMX
字号:
<%@ WebService Language="C#" class="Fibonacci"%>

using System.Web.Services;
using System.Web.Services.Protocols;

public class SimpleSoapHeader : SoapHeader
{ 
  public string value;
}

public class Fibonacci
{
  public SimpleSoapHeader simpleHeader;

  [WebMethod, SoapHeader("simpleHeader")]
  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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -