Let's say I want to find the value of a cell in an Excel file. In VBA, I would do this:
Dim varValue As Variant
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Sheet1")
varValue = ws.Range("A1").Value
How do I set up a Visual Studio project so I can access and modify an Excel file in C# rather tha...
I have a pet project that I'm working on that has multiple worker threads. Outputting everything to the console is getting hard to follow, so I want to develop a UI that will have one output area per thread. I want to know the best way for the threads to send updates to the UI. I have two ideas:
1) Have each thread set a "DataUpdated" f...
I'd like to automatically update the AssemblyFileVersion on each build, though not the AssemblyVersion.
Is there any easy way that don't require every developer to install the MSBuild community tasks ?
(I'd basically like AssemblyVersion("1.0.*") but for the AssemblyFileVersion )
...
I came across a rather strange problem with linq-to-sql. In the following example,
var survey = (from s in dbContext.crmc_Surveys
where (s.crmc_Retail_Trade_Id == tradeId) && (s.State_.Equals(state))
select s).First();
If tradeId is null, it doesn't behave as if I h...
Hi,
is there any good program for viewing functions / messages that are being executed on the .net framework in the background? i'm looking for something similar to what spy++ is doing, just for .NET only.
I have some weird behavior that i need to understand what causing it, and i don't think on any better alternative.
Thanks
...
Consider the Employee, Manager, and Assistant classes:
public class Emp
{
public string Name { get; set; }
public Manager Manager { get; set; }
public Assistant Assistant { get; set; }
}
public class Manager : Emp
{
}
public class Assistant : Emp
{
}
The goal is to DISALLOW a piece of code to access a property like this...
I just ran into one of the most mind boggling errors ever. false == true What information would you guys need to confirm/debug this behavior? I've never seen anything like it.
VS2008 sp1
Debug Mode | Any Cpu
IIS 7.5
Edit:
I did a clean->rebuild and still the same.
Here's the assembly and registers. I don't know how to read t...
Having two models, Site and Link, where a site has many links, how do I delete a link from inside a method of Site, which doesn't have access to the object context?
I've tried something like:
public void DeleteFirstLink() {
var link = LinkSet.First();
LinkSet.Remove(link);
}
but it seems that is not really deleting the link, ...
Hey All,
assuming I'm running a small shop (3 devs) and using a Windows 7 machine as a centralised Git and IIS server what is the easiest way to get CI up and running?
This must be locally hosted CI (no github, no remote servers).
I'm doing C# .Net development with Visual Studio 2008.
Any help on getting this running with the minimum...
I have a project that uses a few 3rd party DLLs, and am working on the setup project for deployment. The program runs fine when running (debugging) from within Visual Studio 2005, but does not when "installed".
The DLLs get copied to the application folder correctly. My understanding is that the DLLs are not being registered by the in...
How is something like this done in linq? It has filter criteria on the JOIN.
This is taken from this question: http://stackoverflow.com/questions/1401889/sql-filter-criteria-in-join-criteria-or-where-clause-which-is-more-efficient
select salesman.salesmanid, max(sales.quantity)
from salesman
inner join sales on salesman.salesmanid =sa...
Is there a way to call a procedure in Visual Basic (.net) with a variable name?
For example, the variable strColour can be one of 10 pre-defined values, green blue black white red pink orange yellow indigo purple. How to handle each one is in it's own Sub Routine, colgreen, colblue, colblack and so on.
I can use a bunch of if..then..e...
Why would anyone want to not use a code behind file so that server sided code is separated from markup? Wasn't that supposed to be one of the advantages of .NET over classic ASP?
Personally, I think mixing code with markup makes the code a lot harder to understand.
I hate to see those darn <% %> (server sided blocks) inter-spliced in ...
min 3 letters
max 15
characters A-Za-z0-9
special charaters @#$%^&+=
This is what I have:
Regex.IsMatch(Password.Text, @"^[A-Za-z0-9@#$%^&+=]{3,15}$ ")
It always returns false.
Please help.
...
I have a strange XAML Error that comes up in Visual Studio. I have Isolated it to the code below which causes it. The XAML designer errors when the converter below is used, however the application runs just fine without error. I like to keep the code tidy and remove all warnings and errors, what do I need to do to get rid of this one?
...
I am using the publish to provider feature in .net 2008 to produce a database creation script.
In the script exists the following line:
/****** Object: Role [srvTTAS] Script Date: 01/20/2010 09:14:14 ******/
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'srvTTAS')
BEGIN
IF NOT EXISTS (SELECT * FROM sys.databas...
Hi there,
I have some silverlight code that calls a WCF service which then uses the Entity Framework to access the database and return records.
Everything runs fine but ... when I replace the Entity Framework code with classic ADO.NET code I get an error:
The remote server returned an error: NotFound
When I call the ADO.NET code ...
I'm not sure why but in my asp.net project in this code block when i get an exception on GetRequestStream() i cannot move my cursor to another point in the function as i normally do when i get a function.
The reason is Unable to set the next statement to this location. The next statement cannot be set to another function.
Is there some...
Hello,
I am creating a custom combobox which can draw separators. So, I override OnDrawItem() and OnMeasureItem() methods.
The problem is that OnMeasureItem() is called only once when datasource is changed. So if I want to specify a separator item later I need to remeasure it's height (because items with separator should be taller), but ...
I have Informix Dynamic Server 11.50 and Informix Client SDK 3.5 installed on my server. I am developing a .NET application to read data from Informix database using ODBC functions.
In the database, i have a table with columns of Serial and BigInt data types defined. My data retrieve function looks like this.
Dim cmd As New Odbc.Od...