In case I have .NET framework installed in my computer + all the necessary other language support (Perl Interpreter, etc)
What are the commands I should give in the console to compile programs in the following languages:
1. C
2. C++
3. Java
4. Python
5. VB
6. C#
7. Perl
8. Ruby
Like we have for VB- *vbc program_name.vb*, what are the c...
I am sending mails (in asp.net ,c#), having a template in text file (.txt) like below
User Name :<User Name>
Address : <Address>.
I used to replace the words within the angle brackets in the text file using the below code
StreamReader sr;
sr = File.OpenText(HttpContext.Current.Server.MapPath(txt));
copy = sr.ReadToEnd();
sr.Close(...
Are there methods for encoding and decoding *XML* in .NET? I can't seem to find them and am wondering why they aren't there and what to use instead?
I need to encode an XML document and pass it through to a string parameter on a web service. It then needs to be decoded at the other end.
...
I have an application that depends on other .net assemblies. When I start the application, I get an error that an assembly or one of its dependencies cannot be loaded.
I do not want to put the assemblies into the GAC or into the Directory of the application. Is there a way (app.config?) to tell .net to look into a given path when trying...
In the .NET framework there are a couple of ways to calculate an MD5 hash it seems, however there is something I don't understand;
What is the distinction between the following? What sets them apart from eachother? They seem to produce identical results:
public static string GetMD5Hash(string str)
{
MD5CryptoServicePro...
I want to enable only two columns in the DataGridview to be able to edit.
The others should not be allowed to edit.
Further I am not directly linking to datasource;
I will be doing some thing like this way
DataTable dt = new DataTable();
dt.Columns.Add("Email");
dt.Columns.Add("email1");
for (int i = 0; i < 5; i++)
{
DataRow dr = dt...
I’m trying to build a simple application that will recognize the values of two 6-sided dice. I’m looking for some general pointers, or maybe even an open source project.
The two dice will be black and white, with white and black pips respectively. Their distance to the camera will always be the same, but their position and orientation o...
Tried to install some program, it gives above message requiring 1.1.4322.
BUT as the title says, all the frameworks are already installed on my WinXP SP2, if i inspect C:\WINDOWS\Microsoft.NET\Framework\
The machine has VS2008 which essentially required full installation of Framework 3.5 SP1.
Any ideas? (i know, just re-install framew...
If I have:
ThreadStart starter = delegate { MessageBox.Show("Test"); };
new Thread(starter).Start();
How can I combine this into one line of code? I've tried:
new Thread(delegate { MessageBox.Show("Test"); }).Start();
But I get this error:
The call is ambiguous between the
following methods or properties:
'System.Threading...
Using VS 2010, with ASP.NET, and .NET 3.0, and C#...
When I use a System.Web.UI.WebControls.SqlDataSource and call its Insert() method to insert a new row, and that table has an identity column, I'd like my method to return the value of that column.
For example, in my SQL 2005 table, I've got:
Customer.Id
Customer.FirstName
Customer...
I have a DataTemplate which contains a CheckBox and ListBox. When the CheckBox is checked, I want to change the ItemTemplate property on the ListBox to change the appearance of each item.
Right now, it looks like this:
<DataTemplate DataType={x:Type MyViewModel}>
<DockPanel>
<CheckBox DockPanel.Dock="Bottom"
...
Hi. I am trying to update a text box. I thought my threading code would fix the problem, but it does not. Can anyone help with this?
new Thread((ThreadStart)delegate { txtCapacitance.Text = Math.Round(capacitance, 3).ToString(); }).Start();
Gives the following error:
Cross-thread operation not valid:
Control 'txtCapacitance' ...
I've asked Google and searched through the NServiceBus website and forums, but I can't seem to find any prescriptive guidance on how I would write a Java application to subscribe to a publisher. Does anyone have any such link or experience?
...
I'm looking for a .Net implementation of a multiset. Can anyone recommend a good one?
(A multiset, or bag, is a set that can have duplicate values, and on which you can do set operations: intersection, difference, etc. A shopping cart for instance could be thought of as a multiset because you can have multiple occurrences of the same pr...
I have a .NET windows forms application compiled as x86 – it needs to be compiled as x86 because it references 3rd party DLLs which are 32 bit. The application uses COM interop to automate Office applications and also AutoCAD. My question is: will my COM interop code work okay on a 64 bit operating system against the 64 bit versions of O...
I have a .net assembly that needs to be 32-Bit and needs to be /LARGEADDRESSAWARE.
I know how to do this with EditBin, but I wonder if there is a built-in way in Visual Studio 2010? Or alternatively, did someone write an MSBuild Task for this?
Edit: This is for a C# app, so no linker options sadly :(
...
Is there any Library for .NET that returns SPARQL results in some structured List instead of standard XML format? I am using SemWeb. I could not find any such method.
...
In my naming convention, I use _name for private member variables. I noticed that if I auto-generate a constructor with ReSharper, if the member is a keyword, it will generate an escaped keyword. For example:
class IntrinsicFunctionCall
{
private Parameter[] _params;
public IntrinsicFunctionCall(Parameter[] @params)
{
...
In most examples that you find on the web when explicitly not using "using", the pattern looks something like:
SqlConnection c = new SqlConnection(@"...");
try {
c.Open();
...
} finally {
if (c != null) //<== check for null
c.Dispose();
}
If you do use "using" and look at the generated IL code, you can see that...
I need to access a file as text file and want to process it later. But before I fetch it how I can identify a file that I am taking is a text file only. If file is in another format my whole code interpret wrongly. I want to access and process only text file.
Currently i am using:
StreamReader objReader = new StreamReader(filePath);
...