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
surya syamala
NA
22
15.7k
Exception in c#
Mar 4 2013 6:04 AM
Hi,
Iam getting the exception as mentioned below. Can u pls solve this issue.
A first chance exception of type 'System.InvalidCastException' occurred in App9.exe
'App9.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Debug\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Debug.dll'
Step into: Stepping over method without symbols 'System.Exception.ToString'
Code:
private void textloaded(object sender, RoutedEventArgs e)
//Added tyhis function to access textblock in datatemplate.
{
TextBlock tb = (TextBlock)sender;
tb.Visibility = Visibility.Visible;
//exception at this line.
}
void dispatcherTimer_Tick(object sender, object e)
{
DateTimeOffset time = DateTimeOffset.Now;
TimeSpan span = time - lastTime;
lastTime = time;
timesTicked++;
if (timesTicked == 10)
{
RoutedEventArgs routedEventArgs = new RoutedEventArgs();
textloaded(sender, routedEventArgs);
}
if (timesTicked > timesToTick)
{
stopTime = time;
dispatcherTimer.Stop();
span = stopTime - startTime;
}
}
Thank you,
syamala.
Reply
Answers (
2
)
plz exaplain me how to fetch details of user?
How To Create a report with same Form Details