Got problem with my c# code on form1.cs :
using sonep = session.Broker;
using maind = ClassLibrary1.Personn;
sonep boi = new sonep();
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
maind p = new maind();
p.Nom = txtnom.Text;
p.Prenom = txtprenom.Text;
boi.Insert(p);
}
}
I found this but don't helped me :
https://learn.microsoft.com/fr-fr/dotnet/csharp/language-reference/keywords/using-directive
boiis a variable it cannot be declared out of the scope of a class or method.using session;so i tried to useusing sonep = session.Broker;but when i try toboi.Insert(p);it dont workusing session? This should be valid C#, provided that your namespace is actually calledsession(namespaces are case-sensitive)