I'm working on an ASP.NET MVC 2 application and use a seperate class library for my model. I used resource files in my class library project to embed validation messages and use it in my meta data classes and everything was Ok till I decided to add a new language to my project so I renamed Resource.resx to Resource.en-US.resx and also co...
i need to create an application on a window machine that will communicate with a portable device over bluetooth...i am new to bluetooth so i was wondering what sort of APIs and drivers were available in the windows system...I know there is the bluez stack in Linux and OSX but not so much about the windows system.
and also i need to tran...
Unfortunately, Application.Invoke() is asynchronous:
private string ThreadFunction(int i)
{
string result = null;
Gtk.Application.Invoke(delegate
{
OutputStringToUserInterface("i = " + i.ToString());
result = GetStringFromUserInterface();
});
return result;
}
This means that in this example Thread...
I have tried all sorts of soloutions, such as
http://bloggingabout.net/blogs/rick/archive/2005/05/10/3830.aspx
and
http://www.codeproject.com/KB/GDI-plus/NGif.aspx
but none of them seem to work correctly. NGif was okay, but the resultant gif was corrupt (white pixels on first frame). And I couldn't get Rick van den Bosch's code to work a...
Im trying to write down an UTF8 string (Vietnamese) into C# Console but no success. Im running on windows 7.
I tried to use the Encoding class that convert string to char[] to byte[] and then to String, but no help, the string is input directly fron the database.
Here is some example
Tôi tên là Đức, cuộc sống thật vui vẻ
tuyệt ...
I am using excel as a database. I am searching through it using a query. I am using LIKE from SQL. I would like to search ignoring the case.
When I try following
...LOWER([COLUMN_NAME]) LIKE "%query%" It throws me the error as IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
When I use [LOWER(COLUMN_NAME)] LIKE "%query%" It g...
I have a widget class:
public class Widget
{
...
public string UniqueID = "856D9PWW";
public int Price = 325;
public byte[] Data;
...
}
I would like a data structure to store my widgets in. Here's the catch - sometimes I need to find a group of widgets based in their price, and sometimes I need to find a specific ...
Is there any way to write Hebrew in the Windows Console?
I tried the following:
Console.OutputEncoding = new UTF8Encoding(false);
Console.WriteLine("\u05D0\u05D1");
Console.ReadLine();
but instead of "אב" it writes some other Unicode character, that're not in the Hebrew ABC.
Any ideas why?
...
Hi All
Simple question...
I have controls that the user can drag around on my form at runtime. And they can also delete them... Should I just Call .Dispose(); when they click the delete button, or should I do something like panel1.Controls.Clear(Control); ? ...Or something else?
Thanks :)
Bael
...
Suppose i have a pointer of type char* to unicode string, and i know the length:
char* _unmanagedStr;
int _unmanagedStrLength;
and i have 2 ways to convert it to .NET string:
Marshal.PtrToStringUni((IntPtr)_unmanagedStr, _unmanagedStrLength);
and
new string(_unmanagedStr, 0, _unmanagedStrLength);
In my tests, both calls gives me...
I've this little method which is supposed to be thread safe. Everything works till i want it to have return value instead of void. How do i get the return value when BeginInvoke is called?
public static string readControlText(Control varControl) {
if (varControl.InvokeRequired) {
varControl.BeginInvoke(new MethodI...
This is most probably a stupid question, but I'd like to make sure I did not miss anything:
Am I right to assume that using Elmah and code obfuscation at the same time does not make much sense since Elmah won't be able to produce any meaningful call stacks?
Thanks,
Adrian
...
I am wondering why the .NET framework does not provide any managed methods for working with USB drivers. From everything I have read you still have to call into Windows API's and use marshalling and PInvoke and all that crap that none of us .NET programmers want to have to do. Why does .NET provide methods for communicating with serial ...
Hi,
I subscribe to an Event inside a class. Such as
MainStation mainStation = StationFactory.GetMainStation();
mainStation.FrequencyChanged += new EventArgs(MainStation_FrequencyChanged);
My MainStation class raises the event on some condition by just calling the event FrequencyChanged()
The Problem
Now I have a scenario whe...
I know it's possible to reset the My.Settings with Reset() method.
Is there anyway to do the same thing for just one setting? Or simple getting its default value instead of the one changed by user. (I'm referring to User Scope Settings)
...
Possible Duplicates:
What ORM frameworks for .NET Do You Like Best?
Which ORM for .net would you recommend?
What is your favorite ORM for .NET?
Which features/tools/facilities made it special for you?
...
To start, I'm aware of the debate over the value of programming certifications. It's not really the subject of this question. Suffice to say that I believe studying for a certification will greatly help me in understanding .NET.
I've been looking at the .NET certification options, starting with exam 70-536, which is for .NET 3.5. .NET 4...
... if I use an IDisposable in a local variable, but do not call Dispose() or use the using() pattern.
public void BadMethod()
{
var fs = new FileStream("file.txt", FileMode.Create);
fs.WriteByte(0x55);
// no dispose, no using()
}
Just like the "Types that own disposable fields should be disposable" rule for fields.
EDIT...
I have a windows installer project which installs some software (winform, service, mce addin). During the installation I need to search the machine for a registry key. This is done with with the "Launch Condition" -> "Add Registry Search" (Deployment Project).
I have filled out all the properties right, and checked against the regestry ...
I am looking for a .NET API for Google-Talk (talk/voice/video/file).
Any resources?
...