vb.net

Is there a hidden iteration counter in this for loop?

If you have a for loop such as: For Each s As String In stringList ..do stuff.. Next is there some sort of (hidden) iterator or do I have to add an external integer to keep count: Dim i As Integer For Each s As String In stringList ..do stuff.. i += 1 Next ...

How to create a simple line graph in VB.NET for a website

Hello, Has anyone got any suggestions on how I can create a very simple graph for a web application? It is to show energy consumption levels per month for a year at a time. So basically I want it to look like (assuming my ASCII works) -- \ -- Yeah it doesn't so I've changed my open id image to the sample http://mrbrutal.myo...

Is there a control which emulates Excel functionality but is not Excel?

I'm creating a VB.net application with VS2005 which, at the moment, uses the DataGridView to emulate Excel style functionality on a very basic level. Before I go crazy with creating custom methods for the DataGridView to do some more advanced things, does anyone have a suggestion for an alternative? I plan on installing my app on machine...

How do I create compiled user files in Visual Studio 2008?

In C++ you are able to compile files that are not included in the solution, with c# this is not the case. Is there a way to keep a file in a project but not have the standard SCCI provider attempt to keep checking in the file? Essentially what we are wanting to do is to create "by developer" code ability similar to how we code in c++, ...

Fixed length strings or structures in C#

I need to create a structure or series of strings that are fixed lenght for a project I am working on. Currently it is written in COBOL and is a communication application. It sends a fixed length record via the web and recieves a fixed length record back. I would like to write it as a structure for simplicity, but so far the best thing I...

Generate XML documentation for private members

Is there a way to generate XML documentation for private members? Be default it only generates it for public members, which is correct for published code but not for code only used within a company. ...

VB.NET- Peformance when testing an empty string

In VB6, I was told that when testing for an empty string, it would be much faster to check this by verifying the length of the string by using : If Len("ABC") = 0 then 'fast or If LenB("ABC") = 0 then 'even faster instead of: If "ABC" = "" then 'slower Do you know by any chance if this is true also in VB.NET? Thank you. ...

Does DynamicInvoke on a remote object work asynchronously?

I have inherited some majorly spaghetti code (combination C#/VB) that I'm trying to understand here. This appears to be a really weird situation where there are two successive calls to fire events to a remote object, which is being done by calling the DynamicInvoke method of a delegate, of the form: delegate1.DynamicInvoke(args1); // s...

Common Runtime ?

Hi Something I'm not to clear about, I understand there are differences between C# and VB.NET (mainly in the use of pointers) but why if both have a Common CLR, does XNA (for example) only work with C# and not VB.NET, or is it that the add ins to visual studio have been aimed at C# rather than VB.Net, and infact the language extensions ...

add rows to a dataset

is it possible to add rows to a dataset ...

Pound sign (#) in VB.NET

I have this legacy code that I am working with and there is code like this all over the place: #If PRE611 = True Then 'Do Something #Else 'Something Else #End If I am pretty sure the PRE611 has something to do with versioning, but I would like to know what specifically the # sign does. ...

How do I get NAnt to use the new VB9 compiler for .NET 2.0 applications?

How do I tell NAnt to use the same VB compiler VS2008 uses when it creates .NET 2.0-targeting applications? I have switched a web application to VS2008 back-targetted to .NET 2.0. I can run NAnt (0.85rc4, 0.85, and 0.86b1) just fine once I do this. When I try to use some of the VB9 syntax, that still compiles just fine back to a .NET 2....

View underlying SOAP message using vb.net

I have a VB.NET web service that calls a third party web service. How can I view the SOAP message generated by .NET before it is sent to the third party web service and how can I see the SOAP response before it is serialized by .NET. When creating a standalone EXE, I see the Reference.vb file that is automatically generated, but don'...

Command Line Compiling Settings.settings using VBC

To an earlier question of mine, invovling VBC and NAnt with WinForms, I have since come up with a better way of stating this. Within vbproj file, you have the following: <ItemGroup> <None Include="My Project\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <CustomToolNamespace>My</CustomToolNamespace> ...

Integer.TryParse - a better way?

I find myself often needing to use Integer.TryParse to test if a value is an integer. However, when you use TryParse, you have to pass a reference variable to the function, so I find myself always needing to create a blank integer to pass in. Usually it looks something like: Dim tempInt as Integer If Integer.TryParse(myInt, tempInt) T...

WPF ComboBox Font Binding FileFormatException

I have a WPF Combobox that is binding to Me.fontComboFast.ItemsSource = Fonts.SystemFontFamilies <ComboBox x:Name="fontComboFast"> <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> </ComboBox.ItemsPanel> <ComboBox.ItemTemplate> <DataTemplate> ...

How can I write special character in VB code

I have a Sql statament using special character (ex: ('), (/), (&)) and I don't know how to write them in my VB.NET code. Please help me. Thanks. ...

Passing variables with AjaxPro

I found this AJAX .NET framework the other day, and so far I am enjoying working with it. However, one thing I can't figure out (the documentation is rather poor atm) is how to pass variables through the AJAX script. This is what I have so far: //default2.aspx.vb <AjaxPro.AjaxMethod()> _ Public Shared Function testSomething(ByVal ...

Full Linq Query Instead of Lambdas with Fluent-NHibernate?

I'm trying to use Fluent-NHibernate's Query method which looks like this: public T[] Query<T>(Expression<System.Func<T, bool>> where) { return _session.Linq<T>().Where(where).ToArray(); } I'm using VB, so to send it a lambda expression I can call it with a line like this: Dim products = flRepos.Query(Of Pr...

LINQ to SQL Query Syntax

I have several tables that center around an organization table that simply holds a unique ID value. Each Organization can then be at a particular location and have a particular name. The tricky part is that the organizations support location and name changes with a specified effective date of each change. For this example I have 4 releva...