Jump to content

Close
Photo

Is there any programmer here?


  • This topic is locked This topic is locked
1 reply to this topic

#1 Sakamaki Izayoi

Sakamaki Izayoi

    Heaven and Earth Deity

  • Kyuubi
  • PipPipPipPipPipPip
  • 7,679 posts
  • Gender:Male

Posted 05 November 2012 - 04:48 PM

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.
SK-303_image007.jpg

#2 narulsaku

narulsaku

    FALLEN ANGEL

  • Summoning Master
  • PipPipPip
  • 1,383 posts
  • Gender:Male
  • Location:odisha , India
  • Interests:playing vedio games , readin' mangas , books ,singing , drawing , and also listing music , hang arround with friends , cricket, football, and also table tennise,eating
    I love multipllayer games like dog fight , tanki online.
    ect....

Posted 01 December 2012 - 08:47 AM

shouldnt it be in tech help fourm

god is sweet.......
courage,,,,,,,,,,,
doesn't always roar.............
sometimescourage is quite voice at the
end of the day saying,,,,,,,,,,,,,,,,,,,,,
'll try again tomorrow"





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users