I have a problem with function using ref parameter. This function call herself using linq like this :
public Champ(tabloidConfigColonne tcc,ref Dictionary<string, Jointure> jointures)
{
...
sousChamps = lc.ToDictionary(
o => o.nom,
o => new Champ(o, ref jointures));
}
An error appear saying ref not available in anonymous function.
Full function is here
public Champ(tabloidConfigColonne tcc,ref Dictionary<string, Jointure> jointures)
{
nom = tcc.champ;
description = tcc.titre;
type = tcc.type;
valeurDefaut = tcc.valeurParDefaut;
modeEdition=new Template(tcc.editeur, tcc.editeurParam1, tcc.editeurParam2, tcc.editeurParam3);
if (!string.IsNullOrEmpty(tcc.jointure))
{
jointure = jointures[tcc.jointure];
nomTable = jointure.nomNouvelleTable;
}
visu=tcc.visu;
Groupe=tcc.groupe;
Id=tcc.nom;
valideurs = tcc.valideurs;
Obligatoire = tcc.obligatoire;
if (tcc.colonnes.Count>0)
{
List<tabloidConfigColonne> lc = tcc.colonnes.GetColonnes(visibiliteTools.getFullVisibilite(),false);
sousChamps = lc.ToDictionary(
o => o.nom,
o => new Champ(o, ref jointures));
}
}
thanks for your help.