I have a class declared as follows:
Public MustInherit Container(Of T As {New, BaseClass}) Inherits ArrayList(Of T)
I have classes that inherit this class.
I have another class that I must pass instances in this method:
Public Sub LoadCollection(Of T As {BaseClass, New})(ByRef Collection As Container(Of T))
I need to store the pas...
I have a bit of code that passes around a ton of objects and I want to determine if there are any references still lingering around that I am unaware of and where it is those references are located. Any idea of how I can do this?
My understanding is that the watch window only allows me to see items available to the currently executing ...
Why can't I create a class in VB.NET that inherits System.IO.Directory? According to Lutz Roeder, it is not declared as NotInheritable!
I want to create a utility class that adds functionality to the Directory class. For instance, I want to add a Directory.Move function.
Please advise and I will send you a six pack. OK nevermind I'm...
As just stated in a recent question and answer, you can't inherit from a static class. How does one enforce the rules that go along with static classes inside VB.NET? Since the framework is compatible between C# and VB it would make sense that there would be a way to mark a class static, but there doesn't seem to be a way.
...
I have a string in a node and I'd like to split the string on '?' and return the last item in the array.
For example, in the block below:
<a>
<xsl:attribute name="href">
/newpage.aspx?<xsl:value-of select="someNode"/>
</xsl:attribute>
Link text
</a>
I'd like to split the someNode value.
Edit:
Here's the VB.Net t...
I have the following as the value for my textbox in SSRS report:
=iif(IsNothing(Fields!MyDate.Value), "", Format(Fields!MyDate.Value.AddDays(30), "MMMM dd, yyyy"))
It gives me an "#Error" every time MyDate is null.
How do i work around this?
UPDATE:
i wrote this custom function, it got rid of the error, but returns January 31,...
In VB.NET (or C#) how can I determine programmatically if a public variable in class helper.vb is used anywhere within a project?
Thanks in advance.
...
I have a page using .NETs server-side input validation controls. This page also has a javascript confirm box that fires when the form is submitted. Currently when the Submit button is selected, the javascript confirm box appears, and once confirmed the ASP.NET server-side validation controls are fired. I would like to fire the server-...
I need to create a user control in either vb.net or c# to search a RightNow CRM database. I have the documentation on their XML API, but I'm not sure how to post to their parser and then catch the return data and display it on the page.
Any sample code would be greatly appreciated!
Link to API: http://community.rightnow.com/customer/do...
The other day I was working on project, and ran into a weird bug. I called a function, and it was only returning the first character from the string which it should have been returning. After trying a hundred different things, refactoring my code, stepping through the code in the debugger many times, and even having a co-worker look into...
I have written an application which has a modal form. How can I ensure that this form does not lose the focus even when an other application is started?
...
What languages feature (1 per answer please) should be added to VB.NET in future versions?
Update: where possible provide links to examples of language feature as used elsewhere.
...
I have this function in VB.net "ENCRYPT" (see below)
Private key() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}
Private iv() As Byte = {65, 110, 68, 26, 69, 178, 200, 219}
Public Function Encrypt(ByVal plainText As String) As Byte()
' Declare a UTF8Encoding object so we may ...
In .NET (VB), how can I take all of the items in one collection, and add them to a second collection (without losing pre-existing items in the second collection)? I'm looking for something a little more efficient than this:
For Each item As Host In hostCollection1
hostCollection2.Add(item)
Next
My collections are generic collectio...
I have the function below ENCRYPT.
Public Function Encrypt(ByVal plainText As String) As Byte()
Dim key() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}
Dim iv() As Byte = {65, 110, 68, 26, 69, 178, 200, 219}
' Declare a UTF8Encoding object so we may use the GetByte
' metho...
How can i extract the list of available SQL servers in an SQL server group? Im planning to put that list in a combobox in vb.net. Thank you.
...
I have a button on an ASP.NET wep application form and when clicked goes off and posts information a third party web service.
I have an UpdateProgress associated with the button.
how do disable/hide the button while the progress is visible (i.e. the server has not completed the operation)
I am looking at doing this to stop users cl...
I want to create Code39 encoded barcodes from my application.
I know I can use a font for this, but I'd prefer not to as I'd have to register the font on the server and I've had some pretty bad experiences with that.
An example of what I've produced after asking this question is in the answers
...
I want to create a VB.NET generic factory method that creates instances of classes (as a home-grown inversion of control container). If I pass the interface IDoSomething as the generic parameter, I want to return an instance of DoSomething (that implements IDoSomething). I cannot figure out the syntax of the if statement. I want to wr...
I've been looking for a cheatsheet to help me remember LINQ syntax but the only ones I've found have been for C#. It seems like the C# syntax for LINQ is pretty different from the VB.NET syntax.
Any suggestions for a good, concise list of LINQ syntax for VB.NET?
...