TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
solomon mwika
1.5k
210
7.9k
timer and passing values to methods from timer event
Jan 28 2014 8:09 AM
need some help trying to pass a value from a timer event
this is my timer event and method being called Mywords ()
_ourwordLength; is an instance variable that is returned by a method
am calling getlength ie int getlength(int _ourwordLength ){ return _ourwordLength; }
private static int _ourwordLength;
public void Timer_tick(object sender, EventArgs e)
{
Mywords(_ourwordLength);
}
The method am passing value to is below
public void Mywords( int length)
{
var ResourceStream = Application.GetResourceStream(new Uri("TextFile1.txt", UriKind.Relative));
using (Stream Myfilestream = ResourceStream.Stream)
{
string s = "";
StreamReader myStreamReader = new StreamReader(Myfilestream);
s = myStreamReader.ReadToEnd();
// string regExp;
if (length == 5)
{
MywordsLength();
}
The problem i have is once the value _ourwordLength is passed to the Timer event where am calling the mywords method its is not being passed to the
mywords method help on this plis
Reply
Answers (
3
)
checkbox issue ? part -2
FTP UPLOAD