error en c#
Publicado por diego (20 intervenciones) el 24/01/2020 03:15:39
Tengo en la version 2017 de VS los siguientes errores:
Hola muchachos : observo que en un programa con VS 2014 pasan desapercibidos estos errores es decir no se presentan estos errores pero en mi version de VS 2017 si se presentan.
Tengo el siguiente codigo en VS2012 pero me presenta estos errores:les pido el favor de su colaboracion.....gracias
adjunto archivos imagen de los errores para que por favor me ayuden gracias

Hola muchachos : observo que en un programa con VS 2014 pasan desapercibidos estos errores es decir no se presentan estos errores pero en mi version de VS 2017 si se presentan.
Tengo el siguiente codigo en VS2012 pero me presenta estos errores:les pido el favor de su colaboracion.....gracias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlTypes;
namespace CapaDatos
{
class Dcategoria
{
private int _Idcategoria;
private string _Nombrecategoria;
private string _Desc_categoria;
private string _Textobuscar;
public int Idcategoria { get => _Idcategoria; set => _Idcategoria = value; }
public string Nombrecategoria { get => _Nombrecategoria; set => _Nombrecategoria = value; }
public string Desc_categoria { get => _Desc_categoria; set => _Desc_categoria = value; }
public string Textobuscar { get => _Textobuscar; set => _Textobuscar = value; }
}
public Dcategoria-----AQUI ME MARCA EL primer ERROR : UN ESPACIO DE NOMBRES NO
PUEDE CONTENER DIRECTAMENTE MIEMBROS COMO CAMPOS O METODOS
{
PUES QUERIA CREAR UN CONSTRUCTOR VACIO Y NO PUDE
}
public Dcategoria(int idcategoria, string nombre_cat, string descripcion_cat,
string textobuscar)------ERROR: EL METODO DEBE TENER UN TIPO DE VALOR DEVUELTO
{
this.Idcategoria = idcategoria;
}
EL ULTIMO ERROR LO MARCA EN Idcategoria asi como lo expongo en la imagen
}
adjunto archivos imagen de los errores para que por favor me ayuden gracias

Valora esta pregunta


0