Hello, guys.
I am not familiar with classes, and the errors are many. I am stuck with the error
Error CS0122 "Empenho.numero" is inacessible due the protect level
Can You help me to understand that error? I am copying the code below.
I am not familiar with classes, and the errors are many. I am stuck with the error
Error CS0122 "Empenho.numero" is inacessible due the protect level
Can You help me to understand that error? I am copying the code below.
C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace folhaPensao
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//classes
// new Empenho();
//Empenho 31900301 = new Empenho();
Empenho emp319003 = new Empenho();
emp319003.numero = 40;
//ajuda de custo
//ushort empenho = 300;
int ptres = 172256;
int nd = 339093;
uint fonte = 1020000059;
decimal valor = 300m;
decimal pss;
decimal principal;
pss = valor / 10 * 2;
principal = valor - pss;
}
}
}
file Empenho.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace folhaPensao
{
public class Empenho
{
int numero;
}
}
C#:
file Empenho.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace folhaPensao
{
public class Empenho
{
int numero;
}
}