Autor Beitrag
Raiden5
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 25



BeitragVerfasst: Do 03.04.08 13:10 
Hallihallo,

wieder mal ein kleines Problem

ausblenden C#-Quelltext
1:
2:
3:
4:
if (m_currentDir == oldDir)
       {
          prozentBox = megaBytes / 100 * oldDirSize;
       }


ich möchte den errechneten double wert in einer textbox ausgeben lassen

Moderiert von user profile iconChristian S.: Quote- durch C#-Tags ersetzt
bakachan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 503
Erhaltene Danke: 34

W7 (x64) Ultimate
C# / VB.NET (VS2010 Ultimate)
BeitragVerfasst: Do 03.04.08 13:15 
Zitat:
ich möchte den errechneten double wert in einer textbox ausgeben lassen

und was ist dein problem?
TextBox.Text und einfach wert zuweisen.
Raiden5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 25



BeitragVerfasst: Do 03.04.08 13:19 
mein problem ist das er mir sagt eine implizierte konvertierung von double in string ist nicht möglich
bakachan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 503
Erhaltene Danke: 34

W7 (x64) Ultimate
C# / VB.NET (VS2010 Ultimate)
BeitragVerfasst: Do 03.04.08 13:31 
schonmal nach deiner Double-Variable auf "." gedrück?
Da sieht man dann eine Funktion .. .ToString()
Raiden5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 25



BeitragVerfasst: Do 03.04.08 13:49 
Ich glaub ich bin echt zu dämlich
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
if (m_currentDir == oldDir)
            {
                prozent = megaBytes / 100 * oldDirSize;
                prozent.ToString();
                prozent = prozentBox.Text;
            }


bekomme trotzdem die meldung das ich nicht von double in string konvertieren könnte
bakachan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 503
Erhaltene Danke: 34

W7 (x64) Ultimate
C# / VB.NET (VS2010 Ultimate)
BeitragVerfasst: Do 03.04.08 14:00 
sehe ich es richtig das prozent deine double-variable ist?
wenn ja dann nimm:
ausblenden C#-Quelltext
1:
prozentBox.Text = prozent.ToString();					
Raiden5 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 25



BeitragVerfasst: Do 03.04.08 14:03 
natürlich, gott wie dämlich

danke sehr... irgendwie ist heute der wurm drinnen