I find there is more casting required in C# than VB.NET. If Option
Strict/Explicit is turned on, will this basically create the same
environment as C# - uppercase, more casting required, must build event
handlers?
Thanks,
Brett 6 1558
Brett,
No Option Strict does not make from VBNet a kind of C#. To answer you direct
on your lower/uppercase question. The distinct between uppercase and
lowercase is not CLS compliant. However when used in private values in C
languages no problem.
With option strict on, the casting is exactly the same. However by instance
unsafe code is still not possible with VBNet, while in there stays
background compiling to help you direct with errors and auto complete what
is not in C#.
I hope this helps,
Cor
The only thing it will do is require you to declare your variables and
perform the casts. It does not affect the way event handlers are hooked up
for you (static or dynamic) and has no affect on case sensitivity. It is
highly recommended to Set Explicit ON and Set Option Strict ON for any new
VB.NET project. You may need to set them off when converting old VB6 code or
if you are doing late binding and you know what you are working with.
HTH,
-B
"Brett" <no@spam.com> wrote in message
news:uu**************@TK2MSFTNGP15.phx.gbl... I find there is more casting required in C# than VB.NET. If Option Strict/Explicit is turned on, will this basically create the same environment as C# - uppercase, more casting required, must build event handlers?
Thanks, Brett
VB with Option Strict On is actually *more* strict than C#, believe it or
not. That is, C# will let you get away with a lot more implicit casting than
VB with option strict on.
David Anton www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter
and the Instant VB C# to VB.NET converter
"Brett" wrote: I find there is more casting required in C# than VB.NET. If Option Strict/Explicit is turned on, will this basically create the same environment as C# - uppercase, more casting required, must build event handlers?
Thanks, Brett
Well i have some different thoughts about this
I set Option explicit and Option strict on by default above every code
block and not default in the project cause in some circumstances option
explicit is more a pain in the but and i want to have control over it where
to use it or not
when would i not use option strict ???
Well those of you ever involved in writing a remoting project or writing
there own proxy class for webservices will know why ,,,,, cause there are
situations where late binding is actually handy
and it sure is not bad to use it ... that is why remoting is so much
easier to acomplish in VB as in C#
happy coding
M. Posseth [MCP Developer]
"Beth Massi [Architect MVP]" <bm****@comcast.net> wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl... The only thing it will do is require you to declare your variables and perform the casts. It does not affect the way event handlers are hooked up for you (static or dynamic) and has no affect on case sensitivity. It is highly recommended to Set Explicit ON and Set Option Strict ON for any new VB.NET project. You may need to set them off when converting old VB6 code
or if you are doing late binding and you know what you are working with.
HTH, -B
"Brett" <no@spam.com> wrote in message news:uu**************@TK2MSFTNGP15.phx.gbl...I find there is more casting required in C# than VB.NET. If Option Strict/Explicit is turned on, will this basically create the same environment as C# - uppercase, more casting required, must build event handlers?
Thanks, Brett
I agree. That's why I said you may want to set Option Strict Off if you are
doing late binding. Like it comes in handy when you have to write a lot of
Reflection code too. You just need to be really careful because potential
errors won't spring up until runtime.
"M. Posseth" <mi*****@nohausystems.nl> wrote in message
news:d5**********@reader08.wxs.nl... Well i have some different thoughts about this
I set Option explicit and Option strict on by default above every code block and not default in the project cause in some circumstances option explicit is more a pain in the but and i want to have control over it where to use it or not
when would i not use option strict ???
Well those of you ever involved in writing a remoting project or writing there own proxy class for webservices will know why ,,,,, cause there are situations where late binding is actually handy and it sure is not bad to use it ... that is why remoting is so much easier to acomplish in VB as in C#
happy coding
M. Posseth [MCP Developer] "Beth Massi [Architect MVP]" <bm****@comcast.net> wrote in message news:eo**************@TK2MSFTNGP10.phx.gbl... The only thing it will do is require you to declare your variables and perform the casts. It does not affect the way event handlers are hooked up for you (static or dynamic) and has no affect on case sensitivity. It is highly recommended to Set Explicit ON and Set Option Strict ON for any new VB.NET project. You may need to set them off when converting old VB6 code or if you are doing late binding and you know what you are working with.
HTH, -B
"Brett" <no@spam.com> wrote in message news:uu**************@TK2MSFTNGP15.phx.gbl... >I find there is more casting required in C# than VB.NET. If Option >Strict/Explicit is turned on, will this basically create the same >environment as C# - uppercase, more casting required, must build event >handlers? > > Thanks, > Brett >
Then we speak the same Language :-)
"Beth Massi [Architect MVP]" <bm****@comcast.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... I agree. That's why I said you may want to set Option Strict Off if you
are doing late binding. Like it comes in handy when you have to write a lot of Reflection code too. You just need to be really careful because potential errors won't spring up until runtime.
"M. Posseth" <mi*****@nohausystems.nl> wrote in message news:d5**********@reader08.wxs.nl... Well i have some different thoughts about this
I set Option explicit and Option strict on by default above every code block and not default in the project cause in some circumstances
option explicit is more a pain in the but and i want to have control over it where to use it or not
when would i not use option strict ???
Well those of you ever involved in writing a remoting project or writing there own proxy class for webservices will know why ,,,,, cause there
are situations where late binding is actually handy and it sure is not bad to use it ... that is why remoting is so much easier to acomplish in VB as in C#
happy coding
M. Posseth [MCP Developer] "Beth Massi [Architect MVP]" <bm****@comcast.net> wrote in message news:eo**************@TK2MSFTNGP10.phx.gbl... The only thing it will do is require you to declare your variables and perform the casts. It does not affect the way event handlers are hooked up for you (static or dynamic) and has no affect on case sensitivity. It
is highly recommended to Set Explicit ON and Set Option Strict ON for any new VB.NET project. You may need to set them off when converting old VB6
code or if you are doing late binding and you know what you are working with.
HTH, -B
"Brett" <no@spam.com> wrote in message news:uu**************@TK2MSFTNGP15.phx.gbl... >I find there is more casting required in C# than VB.NET. If Option >Strict/Explicit is turned on, will this basically create the same >environment as C# - uppercase, more casting required, must build event >handlers? > > Thanks, > Brett >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Microsoft News |
last post by:
I have a project that was created all with Option Strict OFF. Works great,
not a problem with it. But if I turn Option Strict ON then I get a LOT of
errors.
My question, should I even care...
|
by: fabrice |
last post by:
Hello
I have a little problem with casting in a Datagrid Control. I'm using Option
Strict in my web application.
In a Template Column, I put in an ImageButton Control with a Command...
|
by: Nathan |
last post by:
Hi,
I have an operation in which I divide one integer by another and assign the
result to a third integer. However, I get the error message: "Option Strict
On disallows implicit conversions...
|
by: Shannon Richards |
last post by:
Hello: I have a problem using ByRef arguments with Option Strict ON. I have
built a generic sub procedure "ChangeValue()" to change the value of an
argument if the new value is not the same as the...
|
by: Microsoft News |
last post by:
I have a project that was created all with Option Strict OFF. Works great,
not a problem with it. But if I turn Option Strict ON then I get a LOT of
errors.
My question, should I even care...
|
by: m830266 |
last post by:
I'm trying to use the APAX serial I/O control
(www.turbocontrol.com/AProZilla.htm) in a VB.NET project and I'm having
trouble with its 'data received' events. The data is supplied by APAX
as a...
|
by: guy |
last post by:
when i first started using .net (beta 1) i came across option strict and
thought hey this could be really good, and since then have always turned it
on, most people here seem to agree that this is...
|
by: Rory Becker |
last post by:
A wise man once said: "Never put off until runtime what you can fix at compile
time."
Actually I think he said it about 10 minutes before I started this post.
I am a firm believer, like the...
|
by: =?Utf-8?B?R3JlZw==?= |
last post by:
We have an application in our office that has the Option Strict option set to
off right now. I do understand it should be set to ON, but right now, I'm
just going to continue with it this way since...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |