Click here to Skip to main content
15,889,876 members
Home / Discussions / C#
   

C#

 
AnswerRe: Only look in subfolders.. Pin
Lutosław16-Sep-07 8:46
Lutosław16-Sep-07 8:46 
GeneralRe: Only look in subfolders.. Pin
andredani16-Sep-07 9:03
andredani16-Sep-07 9:03 
GeneralRe: Only look in subfolders.. Pin
Lutosław16-Sep-07 9:37
Lutosław16-Sep-07 9:37 
GeneralRe: Only look in subfolders.. Pin
andredani16-Sep-07 19:17
andredani16-Sep-07 19:17 
GeneralRe: Only look in subfolders.. [modified] Pin
Lutosław17-Sep-07 2:02
Lutosław17-Sep-07 2:02 
GeneralRe: Only look in subfolders.. Pin
andredani17-Sep-07 2:22
andredani17-Sep-07 2:22 
GeneralRe: Only look in subfolders.. Pin
Lutosław17-Sep-07 3:21
Lutosław17-Sep-07 3:21 
GeneralRe: Only look in subfolders.. Pin
Lutosław17-Sep-07 3:34
Lutosław17-Sep-07 3:34 
You should revise your knowledge about variable visibility and their life time.
void A()
{
  string str = new string();
  str = "text";
  // At the end of the method str dies.
}

void B()
{
  string str = new string();  // allocates a new variable regardles the name is the same.
  Console.WriteLine(str); // str is equal to "" here.
}

To stop a timer you must not declare it as a local variable.
Timer oT = new Timer();
private void button1_Click(object sender, EventArgs e)
{
string[] lines1 = System.IO.File.ReadAllLines("inställningar.txt");
string path1 = lines1[8];
string tid = lines1[0];
int dimension = Convert.ToInt32(tid);
//Timer oT = new Timer();
oT.Interval = dimension;
oT.Start();
}

private void button2_Click(object sender, EventArgs e)
{
//Timer oT = new Timer();
// Did you mean "-="?
//oT.Tick += new System.EventHandler(Timerfunction);
oT.Tick -= TimerFunction;
oT.Stop();
}


Greetings - Gajatko

Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

QuestionThe type or namespace name could not be found Pin
Lutosław16-Sep-07 4:53
Lutosław16-Sep-07 4:53 
AnswerRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 5:10
mvePIEBALDconsult16-Sep-07 5:10 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 8:34
Lutosław16-Sep-07 8:34 
GeneralRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 11:09
mvePIEBALDconsult16-Sep-07 11:09 
GeneralRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 11:11
mvePIEBALDconsult16-Sep-07 11:11 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 11:20
Lutosław16-Sep-07 11:20 
GeneralRe: The type or namespace name could not be found Pin
PIEBALDconsult16-Sep-07 15:05
mvePIEBALDconsult16-Sep-07 15:05 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 8:48
Lutosław16-Sep-07 8:48 
GeneralRe: The type or namespace name could not be found Pin
Lutosław16-Sep-07 9:13
Lutosław16-Sep-07 9:13 
QuestionAdd connection Pin
Assaf8216-Sep-07 4:42
Assaf8216-Sep-07 4:42 
AnswerRe: Add connection Pin
PIEBALDconsult16-Sep-07 5:12
mvePIEBALDconsult16-Sep-07 5:12 
GeneralRe: Add connection Pin
Assaf8216-Sep-07 5:53
Assaf8216-Sep-07 5:53 
AnswerRe: Add connection Pin
Paul Conrad16-Sep-07 6:44
professionalPaul Conrad16-Sep-07 6:44 
GeneralRe: Add connection Pin
Assaf8216-Sep-07 6:50
Assaf8216-Sep-07 6:50 
GeneralRe: Add connection Pin
Paul Conrad16-Sep-07 7:00
professionalPaul Conrad16-Sep-07 7:00 
AnswerRe: Add connection Pin
Guffa16-Sep-07 7:18
Guffa16-Sep-07 7:18 
AnswerRe: Add connection Pin
PIEBALDconsult16-Sep-07 8:27
mvePIEBALDconsult16-Sep-07 8:27 

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.