Hi,
i'm working on a Client-Server Game with a tilebased map.
If the user changes the visible section of the map (i.e. scrolls in any direction) i query the server for info about the new section giving X, Y, Width and Height.
The Map info is stored as 2D array
MapTile[,]
(MapTile is a simple Struct)
When the client requests a new se...
I'm having an issue trying to divide two decimals and then display the result. Annoyingly this is only happening on our server, and it appears to work perfectly fine if I run the code locally. This is the code that I am trying to run
decimal dOne = -966.96M;
decimal dTwo = 2300M;
decimal dResult = Decimal.Round((dOne / dTwo), 28,
...
Hi,
In Visual Studio running on an XP 64 bit everything runs fine. I have the web.config with an entry:
( to look for the 'bin' folder of the project where two .DLLs are (Oracle.DataAccess.dll, System.Data.OracleClient.dll)
But, in the Production environment (Windows 2003, 32 bit), I get an error t...
Is it possible to determine the disk spaced used by a class, namespace or method in an assembly? For example in Reflector you can see the number of bytes used by resources in the selected assembly.
I am asking because I am working with Silverlight and my client executable (xap) is getting quite big. It's already possible to see the siz...
Is it really a Good Thing to put connection strings with passwords in the app.config file?
It seems to me that the app.config is not encrypted in any way and the password information can be easily read.
I have an app which accesses a database for which the intended end-user have no authentication. A group user/password is used. The ap...
With Entity Framework, I try to delete some objects from my object context like that :
foreach (var item in context.Items.Where( i => i.Value > 50 ) )
{
context.Items.DeleteObject(item);
}
With this code, I have a "Collection Was Modified" Exception.
So, how can I do a batch delete ?
...
I am trying to read about RETS and have understood little.
I basically need to create RETS SOAP web service to post data to a URL. I am trying to do this with ASP.NET and C#.
I need to receive the data entered by users/brokers and then re-transmit in RETS compliant standard XML. It will be sent to these clients who are RETS 2.0 complia...
I am trying to create a .NET Regex to parse a CSS font declaration, which takes following form:
font: italic small-caps bold xx-small 3.0em "Times New Roman", Times, serif;
According to the CSS specification, all of the elements of the declared value are optional, and I have successfully created Regexes that match the first five eleme...
For classes, == and != uses object.ReferenceEquals. But for structs, == and != is not defined.
struct S { }
S s1 = new S();
s1 is ValueType; // true
S s2 = new S();
object.Equals(s1, s2); // true
s1 == s2; // operator '==' cannot be applied.
The default behavior for ValueType equals is reflecting over all fields and checking equality,...
Hello,
I have many Connection strings in my web.config file. I also have a "dataConfiguration" setting in the same file which specifies what database my app connects to.
How do I read the "defaultDatabase" setting / section from the
Please see below xml file. Many thanks in advance
<configuration>
<configSections>
</configSecti...
Here's my situation - I have a simple object model. At the root, there's a Report object. Reports have an array of Documents. Each document has an array of Chapters and Page. Each of these objects has 4 or 5 properties (primitives - strings and integers). It looks something like this:
Report
List< Document>
List < Chapter>
List ...
This is what I am doing, which works 99.999% of the time:
((int)(customerBatch.Amount * 100.0)).ToString()
The Amount value is a double. I am trying to write the value out in pennies to a text file for transport to a server for processing. The Amount is never more than 2 digits of precision.
If you use 580.55 for the Amount, this lin...
I'm trying to get the height and width of the scrollbars that are displayed on a ListView. Is there an easy way to do this? I did some google'ing and it looks like it might be a system setting. I'm just not sure where to look.
...
I'm trying to write a Visual Studio 2010 Extension to show an IronPython shell for debugging C# projects. So obviously I have a reference to IronPython.dll (and a bunch of others). I'm referencing IronPython 2.0.1 here.
My project compiles fine. When I debug it, a new instance of VS is started and all. But when I run the addin command, ...
Here is what I am looking for:
I need to open a zip file of images and iterate through it's contents. First of all, the zip container file has subdirectories and inside one "IDX" houses the images I need. I have no problem extracting the zip file contents to a directory. My zip files can be incredibly huge, as in GBs huge, and so I a...
Hello,
I am having trouble connecting to an informix database from a .net web application. I am not able to modify the code in the application. When I try to run the application, I am getting the following error -
SQL0035N The file "en_us\IBM.Data.Informix.xml" cannot be opened.
I assume it is an incorrect configuration in my ma...
A while back, I wrote my own settings provider because I was having problems persisting settings in a class library. (Note - I had no problems persisting settings from an application).
Today, I just did a test of persisting class library settings and it worked, without my custom provider.
The test is:
(1) Create a class library
(2) Add...
In the code where I work, we got many think like that :
if (user.HasRight("Profile.View")) {}
So, there is many place where we pass a string as parameter to see if the user have a specific right. I don't like that because that generate a lot of magic string.
What would be a better way of doing it ?
Enum, Constant, class ?
...
Background Information:
Visual Studio 2010 (.NET Framework 4.0)
Informix Server 7.31
Informix ClientSDK 3.50 TC7 (Windows 32-bit) was installed as well.
I have tried multiple ways suggested online to connect to the Informix server, but all of them do not work for me for whatever reason. I have looked at articles such as Connect Info...
How would I go about creating a Backlink Checker in C#?
...