Say I am inheriting from a class with several "overloaded" constructors.
By any chance is there a short cut in Visual Studio which writes the constructors in the derived class with the same signatures as in the default class for me, with boilerplate code which calls MyBase.New(...) and plugs in the arguments for me?
EDIT: As far as I ...
I recently found LINQ and love it. I find lots of occasions where use of it is so much more expressive than the longhand version but a colleague passed a comment about me abusing this technology which now has me second guessing myself. It is my perspective that if a technology works efficiently and the code is elegant then why not use ...
As per my application requirement I need to open each form in Access DB to count Activex controls using vb.net. My problem is, one form in the DB is prompting for user input and because of that my application stops until user intervention.
Is there any way to ignore such forms and proceed with scanning DB without user intervention?
Pl...
I'm currently working on a web application (ASP.NET) and some of the pages that are included were created by other programmers, what I noticed is, they are not using "Me(VB.NET)" keyword to access controls, while on my side I used it in every page that I've created. Just to give further information, the web application runs on a .NET Fra...
To count Activex controls from MS-Access forms using vb.net I am using the connection as follws..
oDBEngine = oAccess.DBEngine
oDB = oDBEngine.OpenDatabase(Name:=strFullFileName, Options:=False, ReadOnly:=False, Connect:="")
and Openning the forms in Design mode, as there is a user input prompt form which prevents us to run the applica...
Hi, I need to store the first byte of data read from the network stream as a string, so I can call it back later.
prinf(" While 1
Dim tcpListener As New TcpListener(IPAddress.Any, 80) ' Listen to port given
Console.WriteLine("Waiting for connection...")
tcpListener.Start()
'Accept the pending client c...
Dupe: http://stackoverflow.com/questions/411906/c-net-design-flaws#411919
When I learnt the .NET Framework, I was pleased with the direction Microsoft was/is taking with their application development vision. There was a great sense of enjoyment and excitement developing on the .NET platform, with some areas delivering truly impressive c...
I've recently moved from VB6 to VB.NET and I am finally getting there with understanding the inner workings. I've been looking at my company's existing codebase and I am a little suprised.
I understand that when VB.NET creates a string it see's if the string is in memory and if not creates a new instance of that string, otherwise it po...
Is there an "easy" way to select either a file OR a folder from the same dialog?
In many apps I create I allow for both files or folders as input.
Until now i always end up creating a switch to toggle between file or folder selection dialogs or stick with drag-and-drop functionality only.
Since this seems such a basic thing i would im...
Consider the following code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
If Page.IsPostBack Then
If ViewState("test") IsNot Nothing Then
Response.Write((ViewState("test").ToString))
Else
Response.Write("Viewstate is empt...
I am doing a little debugging, and so I want to log the eventArgs value
I have a simple line that basically does:
logLine = "e.Value: " + IIf(e.Value Is Nothing, "", e.Value.ToString())
The way I understand the IIF function, if the e.Value is Nothing (null) then it should return the empty string, if not it should return the .ToString...
In my code, when a button is clicked the progress bar is set to marquee and then my BackgroundWorker is called but when the BackgroundWorker is called the progress bar freezes or disappears. I use the BackgroundWorker to seperate the RefreshReport method of the ReportViewer from the UI thread. Any help is appreciated. Thanks!
Privat...
UPDATE 2.4.2010
Yeah, this is an old question but I thought I would give an update. So, I'm working with the ReportViewer again and it's still rendering slowly on the initial load. The only difference is that the SQL database is on the reporting server.
UPDATE 3.16.2009
I have done profiling and it's not the SQL that is making the Re...
I am C# developer. I really love the curly brace because I came from C, C++ and Java background. However, I also like the other programming languages of the .NET Family such as VB.NET. Switching back and forth between C# and VB.NET is not really that big of deal if you have been programming for a while in .NET. That is very common appro...
What is the best way of referencing a dynamic delegate. I'd like to do the following with method names returned from a configuration database.
AddressOf "MethodName"
...
Any nice Paneled user interface component COM/ActiveX/Source-code for C#/VB?
Like what VS has internally:
Dock to screen edges
Slide open/close (unpinned)
Pin open
Group in tabs
And if possible, open-source/free.
Well, because otherwise I'd have to develop an interface system myself.
...
the question is in the title
...
(resolved: see bottom)
I have the following code snippet:
Protected Sub SqlDataSource1_Inserted(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs)
Handles SqlDataSource1.Inserted
affected = CInt(DirectCast(e.Command.Parameters("@affected"), IDbDataParameter).Value)
newID = CInt(DirectCas...
What do you see as benefits for one over the other? As far as I know, it's just preference. I have way more experience with C# than I do with Visual Basic and was wondering if I should dabble in Visual Basic for certain types of projects?
...
In my VB.net project I created a custom cursor (Window.cur). How can I assign that to the cursor without having to use the full file path to that file?
VB.Net has My.Resources but it does not show the cursors that are embedded in the project.
I found an example that used code like this:
New Cursor(Reflection.Assembly.GetExecutingAssem...