This is my code:
private void button1_Click(object sender, EventArgs e)
{
DataTable table = new DataTable();
using (SqlCeDataAdapter sqlCeDataAdapter = new SqlCeDataAdapter("SELECT * FROM test", sqlCeConnection))
{
sqlCeDataAdapter.Fill(table);
}
dataGridView1.DataSource = tabl...
http://xurrency.com/api this webservice is returning a json response message. how can I use this message as an object in my .net project (asp.net web app)
...
Hi, i'm ASP.NET programmer and have no experience in creating windows services.
Service i need to create should send emails to our customers each specified period of time. This service should solve issue when hundreds of emails are sent at the same time and block SMTP service on the server while there are many periods of time when SMTP i...
I want to export a table from a mysql database to a txt or csv file like the way you can in phpmyadmin . I currently use the code below but after the program has been running for a few hours it will throw an "tried to read past the stream" error.
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand com...
I am looking for PHP equivalent of the below code even if it is not a compilable code just providing the high level functions to use to perform each of these functionality would be great.
string subscriptionUri = "sample.com";
HttpWebRequest sendNotificationRequest = (HttpWebRequest)WebRequest.Create(subscriptionUri)...
Basically, i am trying to determin if an application made for 1.x will run on a computer with just one copy of the .NET framework installed which is a higher version than what i am targetting, ie: it only has one copy of .NET 2.0, or 3.0, or 3.5 or 4.0 - has one copy of either of these and thats it, the hypothetical computer would not ha...
Is there a way to make a windows forms combo-box read-only?
To be specific: the user should be able to type, but only those values within the box should be allowed (using auto-complete or a select from the list).
Or is the only way to use the validating event?
Regards
Mario
...
Hi,(newbie in .net)
I want all the info. available in the "system configuration " feature of windows in my program.I think there would be an implementation of "GetSystemMetrics" function of the win32 api inside .net somewhere but I can't find it. Also how can I get info. about the system's current DPI settings?
OR,if there's a better w...
If an object realizes IDisposable in C# one can write
using(DisposableFoo foo = new DisposableFoo())
I've always wondered why the using looks like a C# keyword, but requires an interface defined in the .Net framework. Is using a keyword (in this context, obviously it is for defining your library imports), or has Microsoft overloaded i...
Hi. I have created a small application that uses Netflix odata service. I am binding the data to a GridView control. This works as expected expect the Image fields. Does anyone know how to bind the Image to a GridView column? For example, I am doing this to bind the other columns (this does not work for the image data that is in the...
Hi
I want to create a master page dynamically by the user like the one DotNetNuke is done
and load the modules where the user needs. I also want to have nested master pages with the above approach.
Please help me design the above problem.
...
What does it mean when one says no polling is allowed when implimenting your thread solution since it's wasteful, it has latency and it's non-deterministic. Threads should not use polling to signal each other.
EDIT
Based on your answers so far, I believe my threading implementation (taken from: http://www.albahari.com/threading/part2.a...
I store all of Gallio's binaries needed for a project in a SVN repository. I've been using Gallio for several years now and it's an excellent library.
The only real (and unique) problem with Gallio is that it is very bloated, with dozens of assemblies and other files that come in the package. In the very latest release (3.2.603) I coun...
I new to c# and I am trying to create a method which takes a string and then it instantiates an object using the string as a type.
public void CreateRepository( string name) {
var repository = new Repository<name>();
}
e.g.
enter code here
Obviously I get a compiler error but how do I convert my string to a namespace?
...
Hello,
I have an windows application in .NET Compact Framework 1.0. I have migrated the application to .NET CF 3.5 (VS 2008) using the .NET conversion wizard. The CF 1.0 application connects to a web service developed in .NET 1.1. When I tried to connect to the same web service in CF 3.5 application it results in "Remote Server is not r...
I have this:
AudioPlayer player = new AudioPlayer();
player.Directory = vc.Directory;
player.StartTime = vc.StarTime;
player.EndTime = vc.EndTime;
But I could have this:
AudioPlayer player = new AudioPlayer
{
Directory = vc.Directory,
StartTime = vc.StarTime,
EndTime = vc.EndTime
};
If I convert to 'new way of writing t...
Hi,
I've recently tracked down a memory leak in my application and I'd like to add a test case to check that it stays that way. What I want to do is this:
int numberOfInstancesBeforeFunction = GetNumberOfInstancesInMemory(typeof(MyClass));
PerformFunction();
GC.Collect();
int numberOfInstancesAfterFunction = GetNumberOfInstances...
Hi
I'm looking to deploy my first .Net 4.0 app.
I know VS comes with an installer project and a free version of InstallShield, however the free version of install shield doesn't do what I need, or so I think, and the MS installer is end of life so don't want to learn it!
What is everyone using? I have in the past used NSIS but it doe...
I have a .net console application
that runs a method called RunBatch()
on 10 threads.
The method creates a process object
and calls a .bat file.
The .bat file runs an instance of a
tool called Lualatex - which is an
exe that converts .tex files to .pdf
files- and passes it the path of the
.tex file to be converted. (e.g,
Lualatex.exe "F...
Hey guys,
So I have a class which overrides Equals(object obj) and GetHashCode() along with implementing IEquatable. To make working with this type a little more natural when checking for equality I thought, heck, I'd overload the equality operator and inequality operator, no worries...
Uh oh, worries... consider the following - where ...