-
May 19th, 2010, 10:03 PM
#1
Thread Starter
Fanatic Member
Visual Basic vs. C#
Hi,
I would like to know which one do you prefer? Why? Is there any difference besides the syntax?
I know one can do the same, or almost, in both language, have just been wondering this for a while.
Thanks.
-
May 19th, 2010, 10:11 PM
#2
Thread Starter
Fanatic Member
Re: Visual Basic vs. C#
Found this in Wikipedia, I think it's pretty specific and, apparently, many of the difference between both will be (rather were corrected) "corrected" in 4.0. Anything else?
-
May 19th, 2010, 11:32 PM
#3
Re: Visual Basic vs. C#
The only genuinely significant difference between the two is that C# supports pointers and VB doesn't. That can make C# code run orders of magnitude faster in specific situations. Those situations are in very much in the minority though. I've never once used unsafe code in C#.
Other than that, the differences are minor and getting less significant as time goes on. The main point is whether you feel more comfortable with C# syntax or VB syntax. To a large degree that can depend on what you've used before. If you were a VB6 developer then you'll likely feel more comfortable with VB. If you used Java, C++ or any of the many other C-based languages then you'll likely feel more comfortable with C#. That's not the only factor though. I learned to program in C and I worked in C++ for two years before, and I hated VB6, I actually feel slightly more comfortable with VB than C#. It's only marginal though, and I'm happy to work with either and do spend about half my time in each.
-
May 20th, 2010, 12:09 AM
#4
Re: Visual Basic vs. C#
Like jmc says the two languages are becoming closer and closer together. If I had continued on learning programming from when I first became interested in it back in 2000 then I would probably still be coding in Visual Basic. Although, being at a technical school that focuses on where business is going with their needs and wants the course was changed to C# instead of VB.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
May 20th, 2010, 12:12 AM
#5
Thread Starter
Fanatic Member
Re: Visual Basic vs. C#
I actually feel comfortable with both, just wanted to know if there were any significant difference. It appears though, it comes down to personal preference. Guess I'll learn both.
-
May 20th, 2010, 04:45 PM
#6
Re: Visual Basic vs. C#
I don't really prefer either language, but I do prefer the VB editor in Visual Studio, mainly due to the automatic indenting and stuff. I find that I have to go back and use 'format selection' in C# way more often then in VB (and before I knew about 'format selection' I did it manually!). The C# does have some automatic indenting, but mainly when you type a closing brace or parentheses. In VB, it's pretty hard to actually get it to miss-align something even if you try!
I do prefer VB's syntax over C# in most of the newer features such as
Code:
messageTarget = Function(s) ShowWindowsMessage(s) 'VB
messageTarget = s => ShowWindowsMessage(s); // C#
Not sure why but I feel it's easier to read, as with most of VB since it's much more "wordy" then the minimalistic C#.
The only thing I dislike about VB's syntax is the Dim statement It looks so ugly! I don't think using C#'s syntax for declaring variables is too minimal, and it would work well for VB too:
Code:
String s = "Test"
Private Integer i = 3
Protected List(Of Integer) numbers = New List(Of Integer) From {1, 2, 3, 4, 5}
' "modified" For Each
For Each Integer int In numbers
MessageBox.Show(int.ToString)
Next
' "normal" For Each could still work too, but may be confusing as the order is reversed now suddenly
For Each int As Integer in numbers
...
Next
I think it looks ok, better then 'Dim' at least... Ugh.
What I do like about C# is that it enforces rules such as when the use parentheses much better. In C# for example, when you declare a new instance of a class you must use parentheses:
Code:
Button btn = new Button();
Whereas in VB you can leave them out if you want. I like consistency so I always try to write 'C# style' in VB, using parentheses where it would be required in C# even though I'm using VB.
-
May 20th, 2010, 04:51 PM
#7
Re: Visual Basic vs. C#
So....you have a dim view of variable declaration in VB?
There are a couple minor places where the VB syntax appears more clear to me, such as events, but the two are pretty similar. I started in C/C++, so I can read the C syntax pretty well, though I notice that I am getting kind of rusty at it. The thing that mostly bothers me with C is that the typing is so doggone hard to do, but I've flogged that horse in the past, and it is still dead. The point is just that good typists will have an easier time with VB than with C.
My usual boring signature: Nothing
-
May 20th, 2010, 08:34 PM
#8
Re: Visual Basic vs. C#
Originally Posted by NickThissen
I don't really prefer either language, but I do prefer the VB editor in Visual Studio, mainly due to the automatic indenting and stuff. I find that I have to go back and use 'format selection' in C# way more often then in VB (and before I knew about 'format selection' I did it manually!). The C# does have some automatic indenting, but mainly when you type a closing brace or parentheses. In VB, it's pretty hard to actually get it to miss-align something even if you try!
I do prefer VB's syntax over C# in most of the newer features such as
Code:
messageTarget = Function(s) ShowWindowsMessage(s) 'VB
messageTarget = s => ShowWindowsMessage(s); // C#
Not sure why but I feel it's easier to read, as with most of VB since it's much more "wordy" then the minimalistic C#.
The only thing I dislike about VB's syntax is the Dim statement It looks so ugly! I don't think using C#'s syntax for declaring variables is too minimal, and it would work well for VB too:
Code:
String s = "Test"
Private Integer i = 3
Protected List(Of Integer) numbers = New List(Of Integer) From {1, 2, 3, 4, 5}
' "modified" For Each
For Each Integer int In numbers
MessageBox.Show(int.ToString)
Next
' "normal" For Each could still work too, but may be confusing as the order is reversed now suddenly
For Each int As Integer in numbers
...
Next
I think it looks ok, better then 'Dim' at least... Ugh.
What I do like about C# is that it enforces rules such as when the use parentheses much better. In C# for example, when you declare a new instance of a class you must use parentheses:
Code:
Button btn = new Button();
Whereas in VB you can leave them out if you want. I like consistency so I always try to write 'C# style' in VB, using parentheses where it would be required in C# even though I'm using VB.
While I agree with all of this, the one thing I really like about VB is: Private MyClass As New Class, it bugs me that c# makes you type the class twice just to make a new instance of it. That's just a peeve of mine, nothing worth arguing over. The only other thing about c# is the curly braces, they get to be very hard to read since you use them to close everything. Other than those I like c# just as equally as vb.net, though I use vb.net much more often mostly because I came from vb6 and vb6 so...
-
May 20th, 2010, 11:01 PM
#9
Thread Starter
Fanatic Member
Re: Visual Basic vs. C#
Since I'm studying programming in college reading C code isn't as hard as it used to be, I just wanted to know if there were any differences, apart from those described in Wikipedia, but it seems to come down to personal preference since the discrepancy between both language is almost null.
-
May 21st, 2010, 01:47 AM
#10
Re: Visual Basic vs. C#
Originally Posted by tassa
Since I'm studying programming in college reading C code isn't as hard as it used to be, I just wanted to know if there were any differences, apart from those described in Wikipedia, but it seems to come down to personal preference since the discrepancy between both language is almost null.
Don't you mean c# since that is what the title says? However, I have not use c or c++ so I wouldn't know hard they are too learn. Although, now that I am learning programming and my institute it is not as difficult as I found it to be back when I was using vb6.0.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
May 21st, 2010, 01:54 AM
#11
Re: Visual Basic vs. C#
Originally Posted by JuggaloBrotha
While I agree with all of this, the one thing I really like about VB is: Private MyClass As New Class, it bugs me that c# makes you type the class twice just to make a new instance of it.
You can always "var" it up, if you would prefer. Let the type of the instance be inferred.
Gary
-
May 21st, 2010, 02:30 AM
#12
Re: Visual Basic vs. C#
Originally Posted by gep13
You can always "var" it up, if you would prefer. Let the type of the instance be inferred.
Gary
Type inference is valid for local variables only. That said, if you do declare the type of a variable in C# then Intellisense will immediately select that type after you enter the 'new' key word, so the typing isn't a chore.
Last edited by jmcilhinney; May 21st, 2010 at 02:33 AM.
-
May 21st, 2010, 02:34 AM
#13
Re: Visual Basic vs. C#
Originally Posted by JuggaloBrotha
While I agree with all of this, the one thing I really like about VB is: Private MyClass As New Class, it bugs me that c# makes you type the class twice just to make a new instance of it.
I see what you mean, but I actually like C#'s way better, mainly because the 'New' keyboard is easy to miss if you're not carefully reading the code. The difference between
Code:
Dim btn As Button
Dim btn As New Button
is huge whereas there's only 3 letters difference.
In C#, the difference is much more obvious
Code:
Button btn;
Button btn = new Button();
In my opinion, much easier to see quickly whether you're assigning a new instance or not.
And I do dislike typing the name twice, but you can always use 'var' instead. Also, I'm not sure about this, but I think if you type "Button btn = " then Intellisense will provide you with " new Button()" already. If it doesn't do that then that was probably ReSharper helping me out, but it was useful
-
May 21st, 2010, 11:18 AM
#14
Re: Visual Basic vs. C#
Originally Posted by tassa
... since the discrepancy between both language is almost null.
That's the language bias coming through. Had you been studying VB, you would have said that the discrepancy between both languages is almost Nothing.
MS is trying to merge the features of the two languages, and 2010 with the 4.0 framework was supposed to be a solid step in that direction, but not a final step in that direction. There is yet more convergence to come.
My usual boring signature: Nothing
-
May 22nd, 2010, 04:17 AM
#15
Re: Visual Basic vs. C#
The important thing that you need to learn is the framework. You need to know what classes you need to use, for instance, to read and write to a text file, you need to become familiar with the classes in the System.IO namespace. Once you know that, the implementation of it is just syntax.
Gary
-
Jun 4th, 2010, 12:19 AM
#16
Hyperactive Member
Re: Visual Basic vs. C#
I think perhaps many here should try to appreciate what is available now. My programming experiences goes back to late 1987. Things were really "primitive" back then. There were no GUI's and nice development environments.
One of my class requirements in college was ANSI C. It was intimidating to say the least. All I had was a blank screen with a menu at the top. Afterward, I tried C+, but didn't have a lot of luck with it.
I've looked at several C# online tutorials and how-to's. Those things were very good and easy to understand. I didn't stick with it because my learning experience was BASIC, QuickBASIC, and onto VB.
There have been times with I thought BASIC really should be called "ASIC". I don't know if this is still taught now or not, but one of the first things I learned is the meaning of the acronym BASIC: Beginner's All-Purpose Symbolic Instruction Code. If someone has never written any application before, then perhaps it is a "beginners" code, but it has grown way beyond what it meant at the start.
So, appreciate what you have now! It could be a lot more difficult.
-
Jun 4th, 2010, 01:19 AM
#17
Re: Visual Basic vs. C#
I like BASIC/VB/VBA/VB.NET type language more than the C/C++/C#/Java type languages just because you can concentrate more on your programming logic rather than handling the compiler's stupid requirements.
I heard this too often from my teachers in my childhood:
"BASIC is a smart language and C is a dumb language. The power of C comes from its dumbness."
The C compiler though powerful at processing, was awkwardly stupid on the programmer. It was hard to handle.
Messed up due to case sensitivity
You missed that () after the function name
You missed the ; at the end of line
You missed the } or put it at the wrong place and now you are searching for the culprit.
Usually the problem was at some line and it reported the problem 100 lines after that. So if you committed a mistake, you had to spend a lot of time debugging it as the exact problem line was seldom pointed out by the compiler.
Also, in VB the structures were (still are) much more clear and distinct. e.g. End If, End While, Next X etc. distinctly tells you what ends where. While in C if you missed one closing braces, it would take more than an hour to figure out the right place to put it (unless the code is well indented and well commented).
Now however as the technology advanced and the IDE and compilers got smarter and smarter the difference is reduced way too much to choose one over the other due to any of the reasons I mentioned above. I still like VB over C#, but that's much of a personal preference than due to language differences.
-
Jun 4th, 2010, 01:29 AM
#18
Re: Visual Basic vs. C#
Personally, due to the fact that I do a lot of web development, to me it makes much more sense to use C#, because there are a lot of similarities in the code structure when using JavaScript, so you don't have to think in two different mind sets and flip between VB.Net and JS.
At the end of the day though, it is personal preference. I have got to the point that I am happy to converse in either language, and now concentrate on getting to know the framework, and what it contains.
Gary
-
Jun 4th, 2010, 01:58 AM
#19
Re: Visual Basic vs. C#
Originally Posted by gep13
Personally, due to the fact that I do a lot of web development, to me it makes much more sense to use C#, because there are a lot of similarities in the code structure when using JavaScript, so you don't have to think in two different mind sets and flip between VB.Net and JS.
That's what I like about C# too! I am glad that we are learning C# because I'm also a web developer (hence my custom title) and would have probably found it confusing trying to get vb.net to work with web stuff.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 6th, 2010, 02:27 PM
#20
Re: Visual Basic vs. C#
Also go with what you need. I moved away from VB because idustry did (in my area) and as a contractor (or ex contractor) I had to code in what I was told and that was always C#. Never seen any VB in web apps.
-
Jun 13th, 2010, 06:28 PM
#21
Re: Visual Basic vs. C#
I like VB.NET's straightforwards names (apart from Dim, which feels natural but makes no sense because, really, couldn't you choose a better word than "dimension"?); C# is sort of strange.
NotInheritable vs. sealed
MustInherit vs. abstract
I also like VB.NET's capitalization, the automatic checking for Nothing/null in event handlers, etc. What bugs me about VB.NET is that you have to put square brackets around GoSub and Let. C# also has a more versatile for loop. VB.NET has a more logical initialization sequence (base class-level initializers, base constructor, class-level initializers, constructor). I can't even remember C#'s. You can also use Declare instead of the longer System.Runtime.InteropServices.DllImport, and you don't have to include "ref" on variables passed by reference (although it does give you a good heads-up).
-
Jun 14th, 2010, 04:31 AM
#22
Re: Visual Basic vs. C#
GoSub doesnt exist in VB.net, does it?
If it does i'm pretty sure you shouldnt be using it
-
Jun 14th, 2010, 05:46 AM
#23
Re: Visual Basic vs. C#
Originally Posted by Pino
GoSub doesnt exist in VB.net, does it?
If it does i'm pretty sure you shouldnt be using it
According to this it does! However, I may have misunderstood what the article is referring to.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 14th, 2010, 05:54 AM
#24
-
Jun 14th, 2010, 07:12 AM
#25
Re: Visual Basic vs. C#
Originally Posted by Nightwalker83
According to this it does! However, I may have misunderstood what the article is referring to.
The article was written in 2004, so quite possibly it has become deprecated since.
Gary
-
Jun 14th, 2010, 08:51 AM
#26
Re: Visual Basic vs. C#
Originally Posted by minitech
I like VB.NET's straightforwards names (apart from Dim, which feels natural but makes no sense because, really, couldn't you choose a better word than "dimension"?); C# is sort of strange.
NotInheritable vs. sealed
MustInherit vs. abstract
I do like c/c++/Java/c#'s way of declaring a variable more than vb's, what bugs me is in c# do declare something as an object and create an instance in one line means you have to type out the object's class twice (or use the var and let Infer do it's thing, which I don't like)
Originally Posted by minitech
I also like VB.NET's capitalization, the automatic checking for Nothing/null in event handlers, etc. What bugs me about VB.NET is that you have to put square brackets around GoSub and Let. C# also has a more versatile for loop. VB.NET has a more logical initialization sequence (base class-level initializers, base constructor, class-level initializers, constructor). I can't even remember C#'s. You can also use Declare instead of the longer System.Runtime.InteropServices.DllImport, and you don't have to include "ref" on variables passed by reference (although it does give you a good heads-up).
Things like GoTo, GoSub, Exit... all shouldn't be used and Let hasn't been needed since QBasic (1985) even though they still have it in VB today.
VB.Net and C# support all of the same loops, so saying C# has a more versatile For loop doesn't make sense, both languages have the For...Next and For Each loops, there isn't any other For loop. Both support the While loop, etc....
C# and VB.Net default to passing things around ByVal (which is only of use for Integer, Longs, Short, Decimal, Double, Single; Classes passed ByVal have the pointer passed, which is what ByRef does). C# doesn't show anything (that I know of) when something's passed ByVal (VB inserts the keyword for you, unless you specify ByVal/ByRef yourself) and if you want to pass an Integer into a sub by reference then in C# you have to specify it (the ref keyword) yourself.
-
Jun 14th, 2010, 09:32 AM
#27
Re: Visual Basic vs. C#
Originally Posted by JuggaloBrotha
C# and VB.Net default to passing things around ByVal (which is only of use for Integer, Longs, Short, Decimal, Double, Single; Classes passed ByVal have the pointer passed, which is what ByRef does). C# doesn't show anything (that I know of) when something's passed ByVal (VB inserts the keyword for you, unless you specify ByVal/ByRef yourself) and if you want to pass an Integer into a sub by reference then in C# you have to specify it (the ref keyword) yourself.
Or, in other words, C# defaults to passing-by-value, while VB has no default. It's just the editor auto-completing it to ByVal by default, but as far as I know you cannot compile your code if you remove that, so VB really has no default.
-
Jun 14th, 2010, 09:40 AM
#28
Re: Visual Basic vs. C#
Originally Posted by NickThissen
Or, in other words, C# defaults to passing-by-value, while VB has no default. It's just the editor auto-completing it to ByVal by default, but as far as I know you cannot compile your code if you remove that, so VB really has no default.
I removed the "ByVal" and compiled and it compiles ok.
-
Jun 14th, 2010, 09:47 AM
#29
Re: Visual Basic vs. C#
And it didn't secretly add it back without you seeing? In my experience it will add it back whenever it gets the change... Strange. I thought it was a requirement.
-
Jun 14th, 2010, 09:52 AM
#30
Fanatic Member
Re: Visual Basic vs. C#
I've always pictured programming languages in "Levels".
Assembler is pretty much as low as it gets - Machine Code with mnemonics.
I think of C (in the old days) as a Medium level language. Human readable language but still quite close to the hardware so you needed to understand your hardware and clean up your own mess when you're done.
Then Basic (in the old days) is a high level language. Very human readable and not much requirement to know much about the hardware because you didn't have much access to hardware anyway. The only way to get near the hardware was to go down a level to something like C.
I mentioned "In the old days" because things have changed and Basic (which was once considered to be a "Beginner's All Purpose Symbolic Instruction Code" has gotten very powerfull so we can do pretty much anything we want with VisualBasic (Don't let then C nerds tell you otherwise) and we don't really need lower level languages anymore.
C# ? It's a high level language just like Basic - I once heard it referred to as Basic with "SemiColons".
I'd say it's "Visual Basic for C nerds"
If you're a C nerd please don't be offended - I'm one too.
Last edited by IanS; Jun 14th, 2010 at 09:57 AM.
-
Jun 14th, 2010, 10:00 AM
#31
Re: Visual Basic vs. C#
Originally Posted by NickThissen
And it didn't secretly add it back without you seeing? In my experience it will add it back whenever it gets the change... Strange. I thought it was a requirement.
No. I confirmed twice before posting here.
Also from what I have read from books, this is one of the differences between VB6 and VB.NET. The ByVal is default in VB.NET while ByRef was default in VB6 and earlier.
-
Jun 14th, 2010, 10:05 AM
#32
Re: Visual Basic vs. C#
Originally Posted by NickThissen
Or, in other words, C# defaults to passing-by-value, while VB has no default. It's just the editor auto-completing it to ByVal by default, but as far as I know you cannot compile your code if you remove that, so VB really has no default.
Yea, when you type something like Private Sub YourSub (YourParam As Type) then press enter it'll insert the "ByVal" for all of the params that don't already have ByVal/ByRef typed in. You know that already..
Originally Posted by IanS
I've always pictured programming languages in "Levels".
Assembler is pretty much as low as it gets - Machine Code with mnemonics.
I think of C (in the old days) as a Medium level language. Human readable language but still quite close to the hardware so you needed to understand your hardware and clean up your own mess when you're done.
Then Basic (in the old days) is a high level language. Very human readable and not much requirement to know much about the hardware because you didn't have much access to hardware anyway. The only way to get near the hardware was to go down a level to something like C.
I mentioned "In the old days" because things have changed and Basic (which was once considered to be a "Beginner's All Purpose Symbolic Instruction Code" has gotten very powerfull so we can do pretty much anything we want with VisualBasic (Don't let then C nerds tell you otherwise) and we don't really need lower level languages anymore.
C# ? It's a high level language just like Basic - I once heard it referred to as Basic with "SemiColons".
I'd say it's "Visual Basic for C nerds"
If you're a C nerd please don't be offended - I'm one too.
C# can use pointers directly, which vb.net cannot do. So I guess one could say c# is a little lower level than vb still, but it's all a moot point.
-
Jun 14th, 2010, 10:33 AM
#33
Re: Visual Basic vs. C#
Originally Posted by JuggaloBrotha
Yea, when you type something like Private Sub YourSub (YourParam As Type) then press enter it'll insert the "ByVal" for all of the params that don't already have ByVal/ByRef typed in. You know that already..
After pressing Enter, if you don't like the changes made by the IDE automatically, press CTRL+Z immediately after that and the changes will revert back.
So doing the above, and removing all "ByVal" I see that it compiles good. Also ByVal is assumed by default, when nothing is not specified.
-
Jun 14th, 2010, 02:21 PM
#34
Re: Visual Basic vs. C#
GoSub and Let don't do anything, but you can't use them as property/method names without brackets.
-
Jun 14th, 2010, 05:18 PM
#35
Fanatic Member
Re: Visual Basic vs. C#
Originally Posted by JuggaloBrotha
C# can use pointers directly, which vb.net cannot do. So I guess one could say c# is a little lower level than vb still, but it's all a moot point.
Microsoft's c# 2005 Step by Step by John Sharp has a page or so about pointers in c and c++ explaining how they're used and the kind of problems they can cause if not used correctly.
It then goes on to say:-
Code:
Reference Variables were added to c# to avoid all these problems.
If you really want to, you can continue to use pointers in c# but you must
mark your code as unsafe.
It then shows a couple of examples of using the unsafe keyword.
It then goes on to say ... unsafe code has a bearing on how memory is managed:
objects created in unsafe code are said to be 'Unmanaged'.
So I reckon what that is saying is that c# 'can' use pointers in similar syntax to c/c++ but you really shouldn't. You should use the same 'reference variables' just like you'd do in VB
Last edited by IanS; Jun 14th, 2010 at 05:27 PM.
-
Jun 14th, 2010, 08:40 PM
#36
Re: Visual Basic vs. C#
Originally Posted by gep13
The article was written in 2004, so quite possibly it has become deprecated since.
Gary
Ah, I missed that.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
Jun 15th, 2010, 04:05 AM
#37
Re: Visual Basic vs. C#
Originally Posted by IanS
Microsoft's c# 2005 Step by Step by John Sharp has a page or so about pointers in c and c++ explaining how they're used and the kind of problems they can cause if not used correctly.
It then goes on to say:-
Code:
Reference Variables were added to c# to avoid all these problems.
If you really want to, you can continue to use pointers in c# but you must
mark your code as unsafe.
It then shows a couple of examples of using the unsafe keyword.
It then goes on to say ... unsafe code has a bearing on how memory is managed:
objects created in unsafe code are said to be 'Unmanaged'.
So I reckon what that is saying is that c# 'can' use pointers in similar syntax to c/c++ but you really shouldn't. You should use the same 'reference variables' just like you'd do in VB
Unmanaged code is not a bad thing, ever done any heavy graphic manipulation? If you didnt use "unsafe" code then it would be painful.
-
Jun 15th, 2010, 11:19 AM
#38
Re: Visual Basic vs. C#
That's what LockBits is for. And you can use graphic APIs, too.
(Well, I guess there's a problem there, too: in my Vista Forms, the thing that's taking the longest is actually locking the bits of the image in the first place.)
-
Jun 15th, 2010, 11:35 AM
#39
Re: Visual Basic vs. C#
Lockbits is unmanaged, unsafe code!
-
Jun 15th, 2010, 11:50 AM
#40
Re: Visual Basic vs. C#
In a managed wrapper, though. 100% safe.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|