.NET 3.5 Optimizations After Converting From 2.0 To 3.5?
Jun 19, 2009
I converted our project from .NET 2.0 to 3.5 and am looking for optimizations that can be done utilizing 3.5 framework. What are some of the things I can do with 3.5 as in Datastructures. using DataAccess apart from LINQ to SQL.
View 5 Replies
ADVERTISEMENT
Jun 16, 2010
I think im going mad but can some show me what im missing, it must be some stupidly simple i just cant see the wood for the trees.BOTH side of this if then else statement are being executed?
Ive tried commenting out the true side and moving the condition to a seperate variable with the same result. However if i explicitly set the condition to 1=0 or 1=1 then the if then statement is operating as i would expect. i.e. only executing one side of the equation...
The only time ive seen this sort of thing is when the compiler has crashed and is no longer compiling (without visible indication that its not) but ive restarted studio with the same results, ive cleaned the solution, built and rebuilt with no change?
Dim dset As DataSet = New DataSet
If (CboCustomers.SelectedValue IsNot Nothing) AndAlso (CboCustomers.SelectedValue <> "") Then
Dim Sql As String = "Select sal.SalesOrderNo As SalesOrder,cus.CustomerName,has.SerialNo,
[code]....
View 4 Replies
Feb 4, 2010
Does the VB.NET 2008 compiler selectively optimize Select Case Statements?
For example, a Select Case Statement with a sufficient quantity of integer cases could be organized as a binary search.
I ask this because I am curious whether or not I should opt for a Select Case in place of If Statements with multiple Else If's where integers or other basic data types are being compared.
View 2 Replies
Mar 25, 2011
I have a few questions regarding database speed issues, I want to learn more on this subject. I searched the internet a bit but could not find an answer that satisfied enough me so I thought i try here. I have used adodb for quite a while but never were in the need of doing it the fastest way. That changed a bit.Is there information on the internet or can you provide me with information that illustrates what the cost is of doing a while not .eof loop to populate a dropdownlistbox with a lot of values or using a different approach? what are the faster approaches? I understand it depends on the situation but i am interested in a summary of some ball park figures. Just to illustrate what is better to use in certain situations.
View 2 Replies
Jan 11, 2010
I've read that making a class sealed in C# is advisable in high-performance scenarios because it frees the compiler to make certain optimizations (e.g., inlining property getters) that it wouldn't be able to make otherwise. Is the same true for NotInheritable in VB.NET?
View 1 Replies
Feb 2, 2009
I am noob to vb.net so be easy , i know in vb6 if you compile your project with p-code instead of native it can make a empty project 12kb, if i compile an blank project in .net it is 15kb with "Enable optimizations" enabled. is there anything else to make projects smaller?
View 3 Replies
Aug 22, 2011
my goal is to
1.Take an file(exe,dll,etc)
2.Convert it into hex
3.place that hex values in a stack
4.Execute the values inside the stack to its original form(i.e. take the elements out of stack and then convert it to a compile format)
Imports System.IO
Sub Main()
Dim fileName As String = "ABC.exe"
[code]....
View 1 Replies
Jun 8, 2009
I am having trouble converting this Do Until loop to a Do While loop. Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click calculates and displays the average sales amount Const strPROMPT As String = _
[Code]...
View 5 Replies
Mar 10, 2010
I have the following in vb.net and need to convert it to c#. Seemed rather simple at first but I need to pass in the NamedObject variable as welll which is supported in vb.net but not in c#..
What are my options.
Here is the vb.net - notice the NamedObject
Public Property Datos(ByVal NamedObject As String) As T
Get
Return CType(HttpContext.Current.Session.Item(NamedObject ), T)
[Code]....
View 4 Replies
Jun 9, 2009
I am trying to convert an MP3 to a wav. The wav file is created, but I am having problems elsewhere. The label is displaying the wrong data("Cancel/Error") and the progressbar is doing nothing. I am using lame 3.98 .exe and a wrapper for the exe. I downloaded the LameShell project from codeproject. Here is a section of the wrapper class. This was originally for resampling a mp3 to mp3.
[Code]...
View 2 Replies
Nov 17, 2010
I'm developing a program to execute powershell from .net app. I found a sample but it uses c# so I'm changing the code to vb.net but I don't know how change the following line:
Collection<psobject /> results = pipeline.Invoke();
View 2 Replies
Feb 14, 2011
The C# version works but when I convert it to VB it doesn't. What am I doing wrong?Its for opening an HTML doc into a usercontrol.
VB
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.UI
[Code]...
View 4 Replies
Apr 9, 2012
how to convert this c++ sub to vb.net?
// Create points to simulate ellipse using beziers
void EllipseToBezier(CRect& r, CPoint* cCtlPt)
{
// MAGICAL CONSTANT to map ellipse to beziers
[code]....
View 3 Replies
Sep 11, 2009
I found some code on preventing DOS attacks written by Omar Al Zabir thta I would really like to use on a website written in VB.NET.
The code is at the following link -[URL] but is in C# I tried to convert using variios different programs but there seems to be one line that keeps giving me problems.It's the line
var hit = (HitInfo)(context.Cache[key] ?? new HitInfo());
in the method -
public static bool IsValid( ActionTypeEnum actionType )
{
HttpContext context = HttpContext.Current;
if( context.Request.Browser.Crawler ) return false;
[code].....
View 5 Replies
Dec 30, 2009
I am trying to convert this code from C# to VB. Tried to use third party tools, but not successful.
[code]...
View 3 Replies
Jan 21, 2010
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code].....
View 2 Replies
Jan 21, 2010
I am converting my project from VB6 to VB.net 3.5 and at one place i have declared private variable a() as variant and i am using some place as b =a(index,0) it will work in VB but gives me error in VB.Net the error is Number of Indices exceeds the number of dimensions of the indexed array.
View 4 Replies
Jan 19, 2011
It is a program on which logic programs can be developed, compiled and downloaded into Programmable Logic Controllers. It is fairly big and complicated and the resulting .exe file is about 2Mb. I need to develop the program further now, and would like to use VB.net. When I try loading the VB6 code into VB.net, it changes all the variables of type Integer and String into type Object. It then states all through the resulting code that the default values are not defined. I assume that if defined as Integer and String variables do not need a default value, it would assume them to be 0 and empty. Any ideas why the program changes the variable types during the converstion? All forms start with 'Option Explicit', so all variables are defined.
View 3 Replies
Sep 25, 2009
I am trying convert a macro for MSProject from VBA to VB to create an add-in. What I am struggling with is the code to set the values of fields on a windows form and how to actually display the form.
What I have so far is:
Dim objProj As Microsoft.Office.Interop.MSProject.Project
Dim objTasks As Microsoft.Office.Interop.MSProject.Tasks
Dim objTask As Microsoft.Office.Interop.MSProject.Task
[Code].....
View 1 Replies
Nov 9, 2010
the following is brief description of how my project works. GUI is used to collect information from User and validates.have got dll named control-class that pass input data from GUI to Business logic DLL.this dLL connect to the database and saves data.after that,it disconnected and takes the results to the control dll,then to GUI which interprets if the input data was successful or not.Is there a tool that can be used to convert VB6 GUI to .net web forms? am not familiar to vb.net.how do you create reference to vb6 dll or COM from vb.net?
View 2 Replies
Aug 29, 2009
I was following this thread [URL]to convert Hex to RGB, but Left$ and Right$ shows up as errors does anyone know why?
View 10 Replies
Apr 10, 2012
I have read the threads on converting PNG to ICO format. I came up with the code below. This works, but it creates a black background where the PNG had a transparent background.[code]....
The _File variable above is a string that has the path to the PNG file.
View 8 Replies
Jul 4, 2011
I was put in a situation where I had to convert RC4 code from c# into vb
I tried getting already made codes online but they did not seem to work as the currently c# one that I have. Maybe a professional will see the mistake I am making. Both codes give a different encrypted result.
c# code:
public static string RC4(string pStrMessage, string pStrKey)
{
char[] lBytAsciiAry;
int[] lBytKeyAry;
[Code].....
View 1 Replies
Mar 8, 2010
converting this to VB.net? Sorry if its wrong forum.
select
((dateadd(dd,0,
datediff(dd,0,GETDATE()))
-
cast((GETDATE()-.5)
[Code]...
View 9 Replies
Nov 1, 2011
I'm actually coding this in c# but I might be able to convert it from vb.net Group1 does not have a declared type, but I believe it should be String.I'm not sure what this part means. Group1 = Right(Space(5) & CLng("&H" & Group1), 5)What is the vb.net or c# equiv?
View 4 Replies
Jan 23, 2009
I'm converting a program from VB6 to VB.NET, but some parameters are declared as "Any". For example:
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory"(ByRef Destination As Any, ByRef Source As Any, ByVal length As Integer)
Private Declare Function NWDSGetContext Lib "netwin32" (ByVal context As Integer, ByVal key As Integer, ByRef Value As Any) As Integer
"As Any" is not supported in VB.NET so I'm wondering what I should change it to.
View 2 Replies
Apr 14, 2011
I'am trying to convert a vb6 form to vb net but i had this error Le concepteur ne peut pas traiter le code de la ligne 307: Me.ImageList1.Key_0 = "" Le code dans la méthode 'InitializeComponent' est généré par le concepteur et ne doit pas être modifié manuellement. Supprimez les modifications et essayez de rouvrir le concepteur.
View 1 Replies
Sep 6, 2011
I have this piece of code which is calling some functions in a web service. however the original was written in VB and when I have converted it it gives me an error in my c# stating that 'The name Information does not exist in the current context' I have checked the VB and it win there either!
[Code]...
View 4 Replies
Nov 9, 2010
I have a COM object in C++ and VB6 and everything is compiled and packaged using Visual Studio 2003. The C++ generates the DLL, and VB6 the EXE, so from the legacy code I can call the EXE that calls the DLL and so on. I need to migrate these to Visual Studio 2008. However, I have some questions
1) I can compile the C++ and generate the DLL - ( I think is ok)2) VB.Net doesn't have the option to generate COM/ActviveX anymore as VB6, so no idea - I tried to generate windows exe and call the dll, but it doesn't work. I think because it has some COM calls.
So what is the best solution to get rid of COM/ActiveX and deliver something?
Compile in C++ and load adding references in VB.net? I tried this but the DLL doesn't load..
View 3 Replies
Apr 12, 2011
I'm in the process of teaching myself C# by converting an existing project and am stuck converting the following vb linq code:
Dim outStuff = From tt In (From t In Products.SelectMany(Function(p) If(p.tags IsNot Nothing, p.tags, New ObservableCollection(Of TagModel)))
Group By tagName = t.name,
v = (Aggregate p In Products Where If(p.tags IsNot Nothing, p.tags.Contains(t), Nothing) Into Sum(p.views)),
nl = (Aggregate p In Products Where If(p.tags IsNot Nothing, p.tags.Contains(t), Nothing) Into Sum(p.num_likes))
[Code]...
var x = Products.SelectMany(p => (p.tags != null) ? p.tags : new ObservableCollection<TagModel>());
var tags = from t in x group t by t.name into g select new { tagname=g.First().name};
View 2 Replies