私はMVC Music Storeのチュートリアルに従っていますが、パート5のHtmlヘルパーでちょっと詰まっています:Part 5。静的型はパラメータとして使用できません
私は、しかし、私は次のエラーを取得しています...(私が間違っている場合:)私を修正してください)今のところ、それを正しく従っているように見える:ここ
'musicStoreMVC.Helpers.HtmlHelper': static types cannot be used as parameters
が自分のアプリケーションからのコードです:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace musicStoreMVC.Helpers
{
public static class HtmlHelper
{
public static string Truncate(this HtmlHelper helper, string input, int length)
{
if (input.Length <= length)
{
return input;
}
else
{
return input.Substring(0, length) + "...";
}
}
}
}
誰もが私が間違ってやっているかを見ることができればより多くの情報が必要な場合、または、私はポインタに感謝するだろう!ありがとう。
感謝を追加します!名前はあまりにも似ていた! :) – 109221793
http://stackoverflow.com/questions/5858591/c-sharp-static-types-cannot-be-used-as-type-arguments –