I need to create a .NET assembly composed of 2 modules: 1 internal (in the DLL) with native code and 1 external (in a .netmodule file).
This would be easy to do, except for the native part.
C#'s compiler can do this (this is what I want, but with native code):
csc /t:library /out:foobar.dll foo.cs /out:bar.netmodule bar.cs
-foobar.dll...
I have to work with dates and times in my .NET project, and one of the things I need to do is get the current date and add 2 weeks onto it, and if the date the user entered is after those two weeks throw out an error. Or, if the date they entered is before the current date throw out another error.
Now, I know how to do this, but not wit...
Hello,
For a .NET 3.5 VS2008 treeview control, where the item labels are set to be editable, how do I save the changes to disk so that I can load them up again when the application restarts?
Thanks
...
Hey guys..
Windows 7 windows naturally have a semi-transparent header. What I just realized is that Google Chrome TabBar blends with this effect as if the TabBar background and the window header was the same thing! pretty much cool!
Is there a way to have the same result with WPF? Any example?
Thanks.
...
Hey all,
I've been playing with SubSonic's SimpleRepository, and it's awesome. However, I would like to know if there's an easy way to apply pending changes to a production system.
Previously, I used SubSonic 2's "Migrations" via a batch file; when I was ready to move to production, I'd just run all the pending migrations against the p...
I am trying to rename a directory in c# to a name that is the same only with differing case.
For example:
f:\test to f:\TEST
I have tried this code:
var directory = new DirectoryInfo("f:\\test");
directory.MoveTo("f:\\TEST");
and I get a IOException - Source and destination path must be different. I have also tried Directory.Move()...
Ok. here's my scenario.
On the build server I run the clean and build which seems to work fine. The same thing on the local doesn't work.
The breaking point somewhere in the build process is the place where Project.Web gets the calls to GetXapOutputFile() to the Silverlight project (the one with xap file) and when it tries to build the ...
I would like to test some exception handling logic in the empty catch block of the below code.
try
{
//Do Some stuff that throws a exception
//This is the code i need
}
catch (Exception)
{
//Handle things that inherits from Exception
}
catch
{
//Handle things that dont inherits from Exception
//Want to test this code
}
...
I've defined a for a specific interface within my StructureMap.config. There can be many different available concrete types defined.
I would like to programmatically retrieve a list of available instance keys (names) that are currently available without actually parsing the StructureMap.config file itself. Is there any way to do this?...
I'm not sure if I'm approaching this the correct way, but am very open and appreciative of any suggestions.
I am building a chart off of data in a SQL database.
The chart has 'Age' and 'Percentile' or those are the 2 fields I am most concerned with.
I have a config section in my web.config called 'Percentiles'. This is so the percenti...
I have a question about .NET regular expressions.
Now I have several strings in a list, there may be a number in the string, and the rest part of string is same, just like
string[] strings = {"var1", "var2", "var3", "array[0]", "array[1]", "array[2]"}
I want the result is {"var$i" , "array[$i]"}, and I have a record of the number whi...
I am learning concepts related to .NET framework. I am confused at one point. From what I understand the compilers CSC.exe and AL.exe compiles the files to form assembly based on the switches. So my question is
1) Different compilers in .NET framework targets the CLR. So does this mean that individual files(code) and resource files are c...
i am using a certificate generated by makecert which has both private and public key.
The java side uses this public key to encrypt the data and .net decrypts it back.
I am trying to decrypt Java's encrypted 64 bit encoded string and getting bad data.
To see if all is good on.Net end, I frist tried to encrypt with the public key and th...
I'm looking for a regular expression that accepts only numerical values and no spaces.
I'm currently using:
^(0|[1-9][0-9]*)$
which works fine, but it accepts values that consist ONLY of spaces. What is wrong with it?
...
in C# i am just trying to create a common function for creating a gridview. here the user just passes the gridview column type, caption and the field name. these parameters are of type string.
so can any one help me out, how to convert the column type which is passed as string to the respective grid data column data type??? (one simple ...
I have read these:
http://stackoverflow.com/questions/76553/adding-item-to-the-desktop-context-menu-in-windows
http://www.informit.com/articles/article.aspx?p=169474
http://msdn.microsoft.com/en-us/library/bb776852%28VS.85%29.aspx
But I cannot find an up-to-date and straightforward piece of information on how to create a context menu...
I've a form containing more than 200 text boxes in .NET desktop application. I want to insert them into their respective 4 tables of Database. Now how should I go about it using Dataset & DataAdapter to do this?
I mean usually this will be the flow:
Populate the DataSet using DataAdapter.Fill(Dataset,"DataTable");
manipuate the data o...
Is there a way to dynamically insert bytecode directly into my C# executable? I'm looking for functionality similar to the asm keyword in C++. Obviously I know I can't insert x86 assembly instructions. I'd only be able insert IL Bytecode.
...
I have a win forms app that needs to allow the user to select a printer from the list of installed printers on the PC. Is there a built in dialog or do i have to write a custom dialog ?
...
I was wondering if I could create a routing map with one more higher level than the controller. The typical routing would include "/controller/action/id". What I am looking for is something like "section/controller/action/id" or "controller/section/action/id". How can i do this?
...