Click here to Skip to main content
15,887,871 members
Home / Discussions / C#
   

C#

 
QuestionIf a class can call its base constructor then why the constructor is not inherited Pin
CRobert45621-Apr-15 17:04
CRobert45621-Apr-15 17:04 
GeneralRe: If a class can call its base constructor then why the constructor is not inherited Pin
PIEBALDconsult21-Apr-15 17:15
mvePIEBALDconsult21-Apr-15 17:15 
GeneralRe: If a class can call its base constructor then why the constructor is not inherited Pin
CRobert45621-Apr-15 17:26
CRobert45621-Apr-15 17:26 
GeneralRe: If a class can call its base constructor then why the constructor is not inherited Pin
PIEBALDconsult21-Apr-15 17:32
mvePIEBALDconsult21-Apr-15 17:32 
GeneralRe: If a class can call its base constructor then why the constructor is not inherited Pin
Matt T Heffron22-Apr-15 9:53
professionalMatt T Heffron22-Apr-15 9:53 
GeneralRe: If a class can call its base constructor then why the constructor is not inherited Pin
David A. Gray3-May-15 10:26
David A. Gray3-May-15 10:26 
AnswerRe: If a class can call its base constructor then why the constructor is not inherited Pin
Eddy Vluggen22-Apr-15 0:28
professionalEddy Vluggen22-Apr-15 0:28 
QuestionWrong select query SQLite? Pin
DPaul199420-Apr-15 20:00
DPaul199420-Apr-15 20:00 
First, I have a button that calls 2 functions. First function (calculateMedieSim()) makes an operation with two number and the second one (selectData()) selects data from tabel. totalsim = 15 and totalsimyes = 8. The result should be 53,3 but it shows 0 Why?
C#
private void button1_Click(object sender, EventArgs e)
        {
            selectData();
            calculateMedieSim();
        }
private void selectData()
        {
            string select = "SELECT * FROM accounts WHERE id=1";
            using (SQLiteCommand cmd = new SQLiteCommand(select, Conexiune.getConnection()))
            {
                using (SQLiteDataReader read = cmd.ExecuteReader())
                {
                    if (read.Read())
                    {
                        totalsim = (int)read["totalsim"];
                        totalsimyes = (int)read["totalsimyes"];
                    }
                }
            }
        }
private void calculateMedieSim()
        {
            medie_sim = (totalsimyes / totalsim) * 100;
            sansa_examen = Math.Round(medie_sim, 2);
            Console.WriteLine(sansa_examen);
        }

AnswerRe: Wrong select query SQLite? Pin
Garth J Lancaster20-Apr-15 20:40
professionalGarth J Lancaster20-Apr-15 20:40 
GeneralRe: Wrong select query SQLite? Pin
DPaul199420-Apr-15 20:43
DPaul199420-Apr-15 20:43 
GeneralRe: Wrong select query SQLite? Pin
Garth J Lancaster20-Apr-15 21:07
professionalGarth J Lancaster20-Apr-15 21:07 
GeneralRe: Wrong select query SQLite? Pin
DPaul199421-Apr-15 0:26
DPaul199421-Apr-15 0:26 
GeneralRe: Wrong select query SQLite? Pin
DPaul199420-Apr-15 20:44
DPaul199420-Apr-15 20:44 
GeneralRe: Wrong select query SQLite? Pin
Garth J Lancaster20-Apr-15 21:08
professionalGarth J Lancaster20-Apr-15 21:08 
GeneralRe: Wrong select query SQLite? Pin
DPaul199421-Apr-15 0:26
DPaul199421-Apr-15 0:26 
GeneralRe: Wrong select query SQLite? Pin
Richard Deeming21-Apr-15 2:30
mveRichard Deeming21-Apr-15 2:30 
QuestionHi! Pin
Member King Fisher20-Apr-15 17:51
Member King Fisher20-Apr-15 17:51 
SuggestionRe: Hi! Pin
Richard MacCutchan20-Apr-15 21:28
mveRichard MacCutchan20-Apr-15 21:28 
QuestionEmpty path name is not legal Pin
DPaul199420-Apr-15 10:12
DPaul199420-Apr-15 10:12 
AnswerRe: Empty path name is not legal Pin
Sascha Lefèvre20-Apr-15 10:18
professionalSascha Lefèvre20-Apr-15 10:18 
GeneralRe: Empty path name is not legal Pin
DPaul199420-Apr-15 10:27
DPaul199420-Apr-15 10:27 
GeneralRe: Empty path name is not legal Pin
Sascha Lefèvre20-Apr-15 10:35
professionalSascha Lefèvre20-Apr-15 10:35 
GeneralRe: Empty path name is not legal Pin
DPaul199420-Apr-15 10:50
DPaul199420-Apr-15 10:50 
GeneralRe: Empty path name is not legal Pin
Sascha Lefèvre20-Apr-15 10:59
professionalSascha Lefèvre20-Apr-15 10:59 
GeneralRe: Empty path name is not legal Pin
dhivya.sakthi21-Apr-15 23:50
dhivya.sakthi21-Apr-15 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.