Re: Setting time in .net 2.0
- From: dariwe <david@xxxxxxxxxxxxxx>
- Date: Mon, 26 Sep 2005 14:13:07 -0700
I'm using the RC released on 9/12/05.
I have looked through MSDN and searched through Google and cannot find a
reference to the ResetTimeZone() method. Do you know where there is
documentation on this?
Here is what I'm trying. Does this code look correct? I haven't done
much with reflection so I want to make sure that it's not just something
that I'm doing wrong with my syntax.
Dim mi As MethodInfo = tz.GetType().GetMethod("ResetTimeZone")
Dim obj As Object = Activator.CreateInstance(tz.GetType())
Dim param As Object() = New Object()
mi.Invoke(obj, param)
And when I run it, there is an exception on the second line that says:
System.MissingMethodException was unhandled
Message="MissingMethodException"
StackTrace:
at System.Activator.CreateInstance()
at UpdateTime.frmUpdateTime.Button1_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at UpdateTime.Form1.Main()
Thanks,
david
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
.
- Prev by Date: Re: SQL Server CE vs. DataTable
- Next by Date: Re: System.MissingMethodException is driving me crazy
- Previous by thread: Re: Setting time in .net 2.0
- Next by thread: Installing CF Apps to OS 5.0
- Index(es):