I need help with this
[code=auto:0]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DiagramaClasses
{
class Matriculado
{
public int Id { get; set; }
public int Sequencial { get; set; }
public float Nota1 { get; set; }
public float Nota2 { get; set; }
public float Media { get; set; }
public int Faltas { get; set; }
public string TipoResultado { get; set; }
public Matriculado(int id,int sequencial,float nota1,float nota2,float media,int faltas)
{
Id = id;
Sequencial = sequencial;
Nota1 = nota1;
Nota2 = nota2;
Faltas = faltas;
Media = media;
TipoResultado = tipoResultado;
}
public string verificarAprovacao(Type TipoResultado)
{
Media = (Nota1 + Nota2)/2;
if (Media >= 6)
{
return tipoResultado.APROVADO; <-------
}
else
return tipoResultado.REPROVADO_MEDIA; <------
if (Faltas >15)
{
return tipoResultado.REPROVADO_FALTA; <--------
}
}
public enum tipoResultado
{
NAO_AVALIADO =1,
APROVADO,
REPROVADO_MEDIA,
REPROVADO_FALTA,
}
}
}
Error is : cannot convert implicity string tipoResultado.
Is there any programmer here?
Started by Sakamaki Izayoi, Nov 05 2012 04:48 PM
1 reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users