Yesterday I was at an interview where my interviewer (who admittedly didn't claim to be an expert on the subject) stated that "VB.NET is more weakly typed then C#" - (At the same time he couldn't recall an example). This statement seemed incorrect to me (particularly given that both languages use the same framework libraries for their types) and I advised as such and that perhaps he was confused with the option to turn Option Strict or Option Infer on/off.
At the same time I know that VB.NET has situations where it will do type coercion - leading to occasionally unexpected results (although I also cant recall under what conditions) - (Actually I think I just remembered that it was mainly when performing arithmetic operations with different types - whereas other languages will force you to be explicit (?) ).
In VB.NET projects, errors are highlighted immediately after cursor leaves the line. In C#, I have to wait several seconds for IntelliSense to highlight it. Also, the C# version doesn't show all project errors in "Errors List", unless you start to build it. Actually, it seems to work differently in every way. Is it possible to adjust that behavior?
I am using both Visual Studio 2008 and Visual Studio 2010.
I have an interesting issue I've run into where I can easily tap into python code from VB in an excel instance, as described here: Calling python script from excel/vba.However, when I mimic the exact same code structure in visual studio in a form, the pyscript.language = "python" line fails. Does anyone know if MSScriptControl.ScriptControl can be used in VB .Net to control python like you can in excel? This would be a lot easier than setting up a com object for my python scripts.
Example code (need to add microsoft script control 1.0 and excel object library):
I've been developing databases for research using ms access for the last few years. The application is used on accross a hospital network and while it was slow initially, itstarting to come to a grinding halt as numerous users are accessing it at once. I've been debating whether to try and develop the front end using vb.net in hopes of making the application faster.Does anyone know if this would be the case?
However, for several years now, I have been working primarily in the .Net space. Initially, my transition into the .Net world consisted of writing and maintaining VB.Net code. VS provided almost all of the nice intellisense support I came to expect after years of working with the Eclipse/Java combo. Eventually my employer decided to do new development in C#. My initial impression of the intellisense support for C# was less than stellar. At times it seems as if VS has no background compiler for C#, but occasionally it does something smart, indicating there is some background processing there, but not quite enough to really boost productivity in meaningful ways. Is there any sane technical reason for this discrepancy regarding intellisense support between the two languages?
I have been doing this project for couple of weeks and i get stuck and cant find a way to do it. I need to compare this 2 txt files. So if the data in FILE A matched data in FILE B, the quantity in FILE B need to deduct the one customer bought and replace the new quantity. For example:
I need to write software that will do a lot of math. Mostly it will be matrix multiplication with integers to compute DCT. How much faster should I expect the code to run in native c as compared to VB .Net? Factor of 2, factor of 10, factor of 1000...?
I am working on a large project with hundreds of dll's being used on the same machine, on the real large windows there is latency issues that I would love to address. The VB6 project was quick and effective but dotnet is bulky and slow compared to vb6 version, what changes from vb6 to dotnet would increase performance and reduce latency in the larger windows?
Working with VB08 3.5 Framework so parallel isn't going to work sadly, what other methods are there from a code standpoint could I use? DUring the conversion process could it be using parts of code that bog the system down?
Im having odd problems with how my form is displaying at runtime...if you look at the 2 attachments you can see at runtime the labels disappear under the check box's, but at design time they are positioned perfectly.
I am using VB.NET and I can't compare the radio button lists selectedItem.Value to a string, it doesn't work...here is the code: (I have also tried selectedValue it does not work either)
[Code]...
Why won't it evaluate that rblOne.SelectedItem.Value = "No" !?!?!? I tried rblOne.SelectedValue, that doesn't work, AND I added .ToString to both, which did not help, I even tried it w/ "No".ToString...this doesn't make any sense.
I have a program that someone else designed the form on and sent to me to populate the code. I am not sure what could have been done to cause this problem, hoping for a quick oversight on my part. There are several fields of textboxes that the user enters numbers in. Normal behavior for textboxes is when you tab to them the current contents are highlighted. On one of these textbox fields, and only that one set of textboxes, the contents are highlighted like normal at first, but after the user edits the content of the textbox, if you tab to it again it will go directly into edit mode instead of highlighting the contents. Each textbox in the field does this individually, so if you just edit one, all the rest will continue to highlight contents until you edit them as well. It appears you don't actually have to change the value of the textbox, just entering edit mode and getting a blinking cursor is enough. I cannot find a difference in the properties of these textboxes compared to the rest.
When I run my app at first its keeps time accurately for the first minute or so there after it starts loosing seconds, and by the end of the day its minutes behind.I've created a class called ServerTimeTimer that has a timers.timer object that elapses every second and adds a second to a dateTime variable, and a property to retrieve the date time.[code]
Following is the OnCallBack (async communications handler method) in C# and translated to VB.NET.The c# one works fine, but the VB.NET one gives a compilation error: "Property access must assign to the property or use its value." The error happens on the following line:
Once in a while, I can't see what I have typed until I move to the next line. Same thing if I try to backspace, the cursor doesn't move until I leave the line. I can fix the problem by closing VS and restarting it.
VS 2010/VB on XP SP3 Microsoft Visual Studio 2010 Version 10.0.30319.1 RTMRel
Is there anyone who knows how to set a field value to a value that I typed? I have an Xtragrid, binded to sql database and I wanna set the dateedited column to todays date when user changes any field on the grid . Since I'm using devexpress I can't just type columnname and set the text to the value I wanted.
I created a dataset in Visual Studio 2010 containing two tables: tblCategories and tblAnswers. tblCategories has two columns: CategoryNumber (AutoNumber and primary key) and CategoryName. tblAnswers has three columns: AnswerNumber (AutoNumber and primary key), Answer, and CategoryNumber. The CategoryNumber columns in each table are related. I have a command button which I want to use to add a record to the CategoryName column in tblCategories with the data typed in a textbox. When I try to access the dataset to add a new row(dataset.tblCategoriesDataTable.NewRow), the NewRow method isn't present. I've done some reading which suggests that I need a TableAdapter, but it seems like that is for connecting to an external file because I have to select a connection. I have no external SQL files or database. I want the user to be able to create a database within my program.
I have an ASPX page (with VB Codebehind). I would like to extend the GridView class to show the header / footer when no rows are returned. I found a C# example online (link) (source). However, I cannot convert it to VB because it uses typed events (which are not legal in VB).
I have tried several free C# to VB.NET converters online, but none have worked.convert the example to VB.NET or provide an alternate method of extending the GridView class.Notes / Difficulties:
If you get an error with DataView objects, specify the type as System.Data.DataView and the type comparison could be the following: If data.[GetType]() Is GetType(System.Data.DataView) Then Since the event MustAddARow cannot have a type in VB (and RaiseEvent event doesn't have a return value), how can I compare it to Nothing in the function OnMustAddARow()?
Name: RyDeR (RyDeR is what I typed in the Textbox) Age: 17 (17 is what I typed in the Textbox) But now I have another Textbox but I want that this textbox automatic changes with what I type in the first boxes. Example:
His name is 'RyDeR' He's '17' years old
.. Like this and if I type something else, it must change to in last textbox.
I've got a typed dataset. I bind the data with a binding source to a form with arround 200 textboxes, dataedits and so on. Everything works fine with one exception:In my database I have empty DateTimes (DBNull.Value). And when they get bound to a DateEdit-Control, I get the following exceptions:
A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll A first chance exception of type 'System.Data.StrongTypingException' occurred in myTestDLL.dll
I tried to change the NullValue-Property in the DataSet-Desinger to something else as 'Throw Exception', but it doesn't work for a DateTime. For other types like Integer or String it works fine.I dont know a nice solution (right now I fill the empty dates with some dummy date and make it invisible in the DateEdit-Control, but this is very uncool) and I hope to find some help here.
I have a DB application that I've created using the Datasources wizard. A particular insert requires that two inserts must be done at the same time meaning that it has got to use transaction. how to use transaction in this situation.Only performance counts!
How do i use a while loop and MID$ function instead of the split function?i'm trying to have the input (textbox) compared to a list(array) in a text document?
I have the following code compiles without issue. Of course, I get an invalid cast xception when executing the Dim C As IDoThingsC = GetThing_C(). Am I missing something?Would you ever want to return an object that does not meet the interface requirement for a function return value?
Public Class ClassA Public Sub DoThings_A() Debug.Print("Doing A things...")