I'm working on a routine to use DynamicMethod to retrieve values from a object. It worked fine with most of data types, except for DateTime.Ticks, which is int64
In the following test app. I uses both MethodInfo and DynamicMethod, the methodInfo returns correct value but DynamicMethod doesn't. Any ideas?
using System;
using System.Re...
I am looking to make a simple application that will capture the video from a Skype window every few milliseconds.
My questions are:
How do I automatically locate the window handle? That is, which is the best strategy (by name or?) and how do I achieve that programatically?
How I keep track of the window location as the user resizes it...
Hello!
I have about 20 classes for different messages and this number are growing. Each class has a unique ID, so I can transform the class on a byte[] with my own method of serialization and then transform a byte[] again on my class with this uniqueID.
All my messages are children of a BaseMessage class that already implements the uniq...
Hi
I am storing all my dates in UTC format in my database. I ask the user for their timezone and I want to use their time zone plus what I am guessing is the server time to figure out the UTC for them.
Once I have that I want to do a search to see what is range in the database using their newly converted UTC date.
but I always get th...
Hi All:
This problem is really befuddling me and hopefully someone could help me out. I've written some plugin libraries for a large java software. Everything works fine and well on my development computer. However, after I compiled and wrapped the software in Nullsoft Installer and install onto another computer, everything but the nat...
I'm a limited user, and I need to write an Outlook macro that exposes a C# library in Outlook 2003 and 2007.
I do not have any admin privilges at all, not even at install time, so I can't run RegAsm and I can't (I assume) write a managed add-in.
Is there any way to call .Net code from VBA in this scenario, or are there any other solu...
Hello,
I am a 4th year computer science student, at university alot of my projects were Java based so I am pretty used to the language, platform and apis. However for a long time, I have been reading alot regarding the .net platform improvements and it's large career opportunities (at least in my country). Now I am considering shifting t...
Hello.. I am trying to decompress a (.gz) file using the GZipStream class that is included in the .NET framework. I am using the MSDN documentation and I keep getting this exception: "Writing to the compression stream is not supported."
Here is the application source:
try
{
var infile = new FileStream(@"C:...
I get confused with some terms while reading MSDN documents and code samples.
What are callbacks in C#? In particular, what are synchronous and asynchronous callbacks ?
Please explain these from a layman's point of view.
Also, please explain the IAsyncResult interface.
How can we implement it? (with very simple example)
Thanks in adv...
Hi,
I have the following LINQ query:
var aKeyword = "ACT";
var results = from a in db.Activities
where a.Keywords.Split(',').Contains(aKeyword) == true
select a;
Keywords is a comma delimited field.
Everytime I run this query I get the following error:
"LINQ to Entities does not recognize the method 'Boo...
Is there support for attached properties in WF4?
If not, how are scenarios common to attached properties ("arbitrary property of parent associated with children") supported in WF4?
...
I have a remoting server that I am successfully using as such. That assembly references a proxy assembly that defines all of the interfaces that will be passed around when a client makes use of the remoting server.
The server itself uses a plugin architecture. I don't think having the plugins access the server object by way of remotin...
I'm trying to raise a button_click event in my code behind for a asp:Button, however it only seems to postback when I click it the SECOND time, rather than the first, am I missing something? Below is my code
<asp:Button AccessKey="Y" EnableViewState="true"
Height="25px" runat="server" ID="myButton"
Text="hello" OnClick="clickit"...
I have a problem: I need space-efficient lookup of file-system data based of file path prefix. Prefix searching of sorted text, in other words. Use a trie, you say, and I thought the same thing. Trouble is, tries are not space-efficient enough, not without other tricks.
I have a fair amount of data:
about 450M in a plain-text Unix-for...
I would like to create a sound visualisation system using C# language and .NET Framework.
This could look like in Winamp application.
Maybe exist free library or some interesting articles which describe how to do it?
Example:
...
What is the best way to launch reporting services reports from .Net code? One method would be to dynamically build a URL and launch a browser. Something like this:
http://server/ReportServer/Pages/ReportViewer.aspx?%2fReport+Directory%2fReport%20Name&FirstParameter=1,2,3&SecondParameter=8/30/2009&rs%3aCommand=Render
I don...
I have the following MySqlCommand:
Dim cmd As New MySqlCommand
cmd.CommandText = "REPLACE INTO `customer` VALUES( ?customerID, ?firstName, ?lastName)"
With cmd.Parameters
.AddWithValue("?customerID", m_CustomerID)
.AddWithValue("?firstName", m_FirstName)
.AddWithValue("?lastName", m_LastName)
End With
I have a class that handles e...
I'm trying to make an autoscroll enabled panel that will scroll if the mouseposition.x > panel.location.y
However, I cannot seem to find a panel.scroll() function. Is there a way to programable make the control scroll?
Thanks
...
I am working on a Silverlight 3 app with C#. I would like to allow the user to download an image from the Silverlight app. I am using SaveFileDialog to perform the file download task. The flow goes this way:
User clicks on Download button in the SL app.
Web service call invoked to get the image from server
OnCompleted async event h...
I have a class that creates a static array of all properties, using a static constructor. I also have a function -- GetNamesAndTypes() -- that lists the name & type of each property in that array.
Now I want to create another instance-level function -- GetNamesAndTypesAndValues() -- that displays the name & type of each property in the...