0
J'ai des problèmes avec mon modèle Contructor
.Modèle Constructeur retour Array
namespace arkiv.Models
{
public class BlogPost
{
public string string1 { get; set; }
public BlogPost()
{
string[] myArray= new string[2]
{ string1
,string22
};
return myArray;
}
errorMessage: Since BlogPost.BlogPost() returns void, a return keyword must not be followed by an object expression.
Pourquoi ne peut pas le modèle Constructor retourner mon tableau?
Bonjour .. vous ne pouvez pas retourner un tableau dans un constructeur. Le type de retour d'un constructeur est nul. – Wheels73