MVC Müzik Mağazası eğitimini izliyorum, ancak bölüm 5: Part 5'da Html Helper ile biraz uğraştım. İşte Statik tipler parametre olarak kullanılamaz
benim uygulamadan kodudur:'musicStoreMVC.Helpers.HtmlHelper': static types cannot be used as parameters
Ben ancak aşağıdaki hatayı alıyorum ... (Ben :) yanlış varsa düzeltin lütfen) düzgün bugüne kadar bunu takip etmiş görünüyor :
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) + "...";
}
}
}
}
kimse yanlış yapıyorum görebiliyorsanız fazla bilgi gerekiyorsa, ya ben işaretçileri için minnettar olurum !! Teşekkürler.
Teşekkür ekleyin! İsimler sadece çok benzer! :) – 109221793
http://stackoverflow.com/questions/5858591/c-sharp-static-types-cannot-be-used-as-type-arguments –