I have a CLI/C++ interface that I want to examine via .NET Reflection. Here's the function signature in the source code:
class ClassA;
template<typename _Type> class ClassTempA;
public interface class Test : BaseFunc {
public:
ClassTempA<int>& SomeFunc2(ClassA inst) = 0;
};
Here's what the function looks like when examined in .N...
How can I use non-default coloring in the DataGrid control in a Windows CE compact framework application?
I need to color one row in color X and one row in color Y (alternating row colors basically).
...
As a programmer who is new to .NET and C#, I find that using .NET Reflector is an incredible utility to use to see how the "professionals" write their code.
Can anyone suggest good .NET based applications to use Reflector on for Desktop Applications - any application examples would be appreciated.
...
Hi all:
We have a ASP.NET application that uses the Exception Handling Application block to log our exception to a database (using logging block indirectly). This all working perfect. However, since it is using the exception handling block to log data, everytime we wanted to log, we'll have to new'd a System.Exception object. Since w...
I am thinking about switching my blog away from Community Server to something that is simpler and focuses more on just being a good blog.
What are the different .NET blogging engines and which one do you recommend?
...
I need your help,
For example I have a decimal type variable and I want to round up this way.
Eg
3.0 = 3
3.1 = 4
3.2 = 4
3.3 = 4
3.4 = 4
3.5 = 4
3.6 = 4
3.7 = 4
3.8 = 4
3.9 = 4
4.0 = 4
4.1 = 5
4.2 = 5
etc....
How can I do that?
...
I've got some code that looks like this:
using (DBDataContext dc = new DBDataContext(ConnectionString))
{
Main main = new Main
{
ClientTime = clientTime
};
dc.Mains.InsertOnSubmit(main);
dc.SubmitChanges();
return main.ID;
}
If I return from inside a "using", will the using still clean up?
...
Ever since Microsoft has introduced the application blocks, I've been bumping into people who use the Exception Handling Application Block. I've recently had a closer look myself and would summarize the basic functionality as follows (skip the following block if you already know what it does):
The exception handling application block...
I'm stuck on a RegEx problem that's seemingly very simple and yet I can't get it working.
Suppose I have input like this:
Some text %interestingbit% lots of random text lots and lots more %anotherinterestingbit%
Some text %interestingbit% lots of random text OPTIONAL_THING lots and lots more %anotherinterestingbit%
Some text %interesti...
I need to do this.
public class MyClass{
private static IDictionary<String, Type> databaseAccessClasses
= new Dictionary<String, Type>();
private static IDictionary<String, Type> DatabaseAccessClasses
{
get { return DataAccessFactory.databaseAccessClasses; }
set { DataAccessFac...
Does anyone know how to take a swf (version 7) and use the SwfLoader or something similar to access a root variable in the swf from a Flex application? I have tried many things with no success. I don't want to clutter this post with all of my failed attempts, but I will post them later if I see that they are needed as examples.
Just so...
Let's say you have a form with a component that displays data from a view on an SQL server. The component would be something like a ListView or DataGrid - basically something that can display the data in a 2D grid format. Another application changes the data that the SQL view describes, and does this regularly but at undefined intervals....
I have an application that imports information from a CSV file or from a database and exports it to XML. This XML is currently being persisted to a file. However due to project needs I have decided it may be better to persist this XML to a database.
Currently I have CSV, XML and SQL repositories that deal with importing/exporting data. ...
I'm trying to parse an array of JSON objects into an array of strings in C#. I can extract the array from the JSON object, but I can't split the array string into an array of individual objects.
What I have is this test string:
string json = "{items:[{id:0,name:\"Lorem Ipsum\"},{id:1,name"
+ ":\"Lorem Ipsum\"},{id:2,name:\...
I have a controller action which I would like to call another controller action.
Is this a valid thing to do. Is it possible?
...
I have a form for editing gigs.
The initial controller action is called "Edit".
The form posts to a second controller action called "Update"
So, once the form has posted, I use a bespoke ModelBinder which uses bindingContext.ModelState.AddModelError to add validation messages to the modelstate
The Update copntroller action looks this...
When doing a simple performance measurement, I was astonished to see that calling String.IndexOf(char) was actually slower than doing it manually! Is this really true?! Here is my test code:
const string str = @"91023m lkajsdfl;jkasdf;piou-09324\\adf \asdf\45\ 65u\ 86\ 8\\\;";
static int testIndexOf() { return str.IndexOf('\\'); }
stati...
I have a byte array that represents a complete TCP/IP packet. For clarification, the byte array is ordered like this:
(IP Header - 20 bytes)(TCP Header - 20 bytes)(Payload - X bytes)
I have a Parse function that accepts a byte array and returns a TCPHeader object. It looks like this:
TCPHeader Parse( byte[] buffer );
Given the ori...
Hi,
What's the best book on designing pretty GUI for .NET applications? like Windows Vista style?
Thank you.
...
I'm a Java EE person who would like to climb the .NET learning curve.
I've always had the impression that one important difference between Java and .NET was that the Microsoft suite required that you (or your employer) had put up some coin to get access to the tools. A Java person has the advantage of being able to download a JVM, Ec...