I used this brilliant solution to convert a linq query to a datatable. But I'm getting a strange error when running it. Build succeeds though.
Compiler Error Message: CS0121: The call is ambiguous between the following methods or properties:
'Gruppkoll.App_Code.ConvertToDataTableFromLinqResult.ToADOTable<Gruppkoll.MessageSet
(System...
Can anyone tell me how to get the Environment.SpecialFolders.MyVideo folder in .NET 2.0?
In .NET 4.0, the MyVideo folder is listed in the enum Environment.SpecialFolders, but under .NET 2.0 it is not existant. Which way would you go if you had to find that folder under .NET 2.0 with different Windows localisations and OS versions?
...
How can I change an image source continuously by xaml codes??
...
Heya,
On the following code
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
s.Bind(new System.Net.IPEndPoint(IPAddress.Parse("127.0.0.1"),0));
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, true);
byte[] bin = new byte[4]{1, 0, 0, 0};
...
Hi guys,
are there any best practices for calling SCSF services asynchronously?
Particularly I'm interesting in:
Executions of requests in background;
Cancellation support;
Reporting progress.
Currently I came up with two scenarios:
Listener Service which listens in background for real-time updates and displays received data in g...
Is it possible to detect if an application has an console window? Either by have used AllocConsole or if it's a regular console application.
Edit:
Solution (thanks to ho1's answer):
public static class ConsoleDetector
{
private const uint ATTACH_PARENT_PROCESS = 0x0ffffffff;
private const int ERROR_ACCESS_DENIED = 5;
[DllI...
Hi all,
I'm building a desktop to-do list app, and in my UI I have a ListView control which lists all the items in each list. Each item/row has a checkbox which updates the status of that item in the database when it is checked or unchecked. So far so good!
What I am attempting to do is re-sort the list whenever a checkbox is clicked, ...
I have seen a couple of references stating that WCF Data Services handles change tracking automatically. Does that mean you don't need to create Self Tracking Entities (STE) and it works automatically with any entity object type? Sorry, a bit confused here and have been struggling to find a resource that clears this up for me.
Thanks
...
Hi,
I have a C#/.NET Winforms application which has some settings stored using A '.settings' file. So the configuration is edited by right-clicking the project in "Solution Explorer" and selecting "Properties->Settings".
However, I also need to be able to catch exceptions thrown by a SerialPort object inside the application. I found a ...
I'm developing an application (.NET 4.0, C#) that:
1. Scans file system.
2. Opens and reads some files.
The app will work in background and should have low impact on the disk usage. It shouldn't bother users if they are doing their usual tasks and the disk usage is high. And vice versa, the app can go faster if nobody is using the dis...
I've been developing a multi-tier application using the following:
ASP.Net - UI Layer
WS - Business Service Layer
WS - Data Service Layer
SQL - Database Layer
Is the security the responsibility of the Architects, Developers or Infrastructure?
More specifically the security from layer to layer.
I guess the answer will be all of the ...
Hi,
how is it possible? I have windows Form control, derived from System.Windows.Forms.Form with WebBrowser control contained in this form. Webbrowser object instance is created in constructor of form (in InitializeComponent() method). Then in background thread I manipulate with content of WebBrowser, and I found that in some cases Form...
Hi,
Simple problem which is causing enormous headaches.
I'm using the JQuery modal plugin (jqm) which is normally initiallised with a function that looks like this:
$().ready(function () {
$('#popup').jqm({ trigger: $('.trigger') });
});
Where #popup is the ID of the element you want to show when the modal is displayed and 'tr...
Consider two extension methods:
public static T MyExtension<T>(this T o) where T:class
public static T MyExtension<T>(this T o) where T:struct
And a class:
class MyClass() { ... }
Now call the extension method on a instance of the above class:
var o = new MyClass(...);
o.MyExtension(); //compiler error here..
o.MyExtension<MyClass...
Hi all.
When I use a DataTable as a DataGridView's DataSource, I often have to find which row(s) a user has selected and read specific values from the DataTable (not the DataGridView)
I wanted to know if there is any reliable way of determining which DataRow a DataGridViewRow is bound to especially when the user has sorted the DataGrid...
How do I walk through an assemblies BAML resources and convert them back to XAML?
...
How do I run some clean up code when a user closes a window?
...
hi, i am trying to configure a dynamic name for my log but i can't.
here the code on my web.config file:
<appender name="RollingFile" type="log4net.Appender.RollingPatternFileAppender">
<file type="log4net.Util.PatternString" value="..l\log\%property{LogName}" />
<appendToFile value="true" />
<rollingStyle value="...
Hii ALL
I have an image folder in the bin folder of my published webservice file, how can i give the path of this folder in the web.config file in Appsettings which i am accessing in the code behind .cs file
...
Hi,
So, I have this application for which we are producing further development versions.
If the application gets uninstalled by the user (from Add/Remove Programs let's say), then I want the application to delete a certain folder in the file system which contains app-related information.
However, if the application is upgraded (by dow...