I fully expected the lack of a way to set Option Strict globally to be fixed
in SP1. I can't seem to figure out if it has been fixed or not. It still
seems we have to add the declaration at the top of each and every single
code module. Am I missing something here?
--
-C. Moya www.cmoya.com
Jan 18 '07
13 2325
You can set it, but it doesn't work as expected.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Michael D. Ober" <obermd.@.alum. mit.edu.no.spam wrote in message
news:75******** **********@news read1.news.pas. earthlink.net.. .
Correct. If you have an existing VB project, you can set it in the project project properties.
Mike.
"sticky" <st********@gma il.comwrote in message
news:11******** **************@ 11g2000cwr.goog legroups.com...
>>I havent used VB.Net in a while, I only use C# nowadays, but I seem to remember that if you want to set option strict globally you need to open visual studio to the start page, with no project loaded and change the option strict setting then. all new projects from then on will be option strict by default.
worth a try, but as I said, I haven't used VB for a while
C. Moya wrote:
>>I fully expected the lack of a way to set Option Strict globally to be fixed in SP1. I can't seem to figure out if it has been fixed or not. It still seems we have to add the declaration at the top of each and every single code module. Am I missing something here?
-- -C. Moya www.cmoya.com
re:
Apparently, you have to manually insert Option Strict On at the top of each and every code module
in ASP.NET 2.0 projects.
Unless you modify the project templates as I outlined.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"C. Moya" <cm*@nospam.com wrote in message news:%2******** *******@TK2MSFT NGP04.phx.gbl.. .
Sure... you can set it in many places... like Tools|Options and Project Properties for WINFORMS
apps (which works) and web.config for ASP.NET 2.0 projects. The problem is that it DOES NOT WORK
for ASP.NET 2.0 projects.
Apparently, you have to manually insert Option Strict On at the top of each and every code module
in ASP.NET 2.0 projects.
I read this has something to do with 2.0's "project-less" infrastructure. .. but it's still a bug
nonetheless.
--
-C. Moya www.cmoya.com
"Michael D. Ober" <obermd.@.alum. mit.edu.no.spam wrote in message
news:75******** **********@news read1.news.pas. earthlink.net.. .
>Correct. If you have an existing VB project, you can set it in the project project properties.
Mike.
"sticky" <st********@gma il.comwrote in message news:11******* *************** @11g2000cwr.goo glegroups.com.. .
>>>I havent used VB.Net in a while, I only use C# nowadays, but I seem to remember that if you want to set option strict globally you need to open visual studio to the start page, with no project loaded and change the option strict setting then. all new projects from then on will be option strict by default.
worth a try, but as I said, I haven't used VB for a while
C. Moya wrote: I fully expected the lack of a way to set Option Strict globally to be fixed in SP1. I can't seem to figure out if it has been fixed or not. It still seems we have to add the declaration at the top of each and every single code module. Am I missing something here?
-- -C. Moya www.cmoya.com
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:O7******** ******@TK2MSFTN GP03.phx.gbl...
re:
>Apparently, you have to manually insert Option Strict On at the top of each and every code module in ASP.NET 2.0 projects.
Unless you modify the project templates as I outlined.
Juan T. Llibre, asp.net MVP
Sigh. So it hasn't been fixed in SP1.
Thanks Juan... I've known about that "workaround " for eons. I was hoping SP1
fixed it.
It's truly (IMO) a dumbfounding lack of foresight on the part of the asp.net
team.
--
-C. Moya www.cmoya.com
re:
It's truly (IMO) a dumbfounding lack of foresight on the part of the asp.net team
Actually, the ASP.NET team has nothing to do with that.
The problem belongs to the Visual Studio Dev Team, not to the ASP.NET Dev Team.
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"C. Moya" <cm*@nospam.com wrote in message news:OT******** *****@TK2MSFTNG P06.phx.gbl...
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:O7******** ******@TK2MSFTN GP03.phx.gbl...
>re:
>>Apparently, you have to manually insert Option Strict On at the top of each and every code module in ASP.NET 2.0 projects.
Unless you modify the project templates as I outlined. Juan T. Llibre, asp.net MVP
Sigh. So it hasn't been fixed in SP1.
Thanks Juan... I've known about that "workaround " for eons. I was hoping SP1 fixed it.
It's truly (IMO) a dumbfounding lack of foresight on the part of the asp.net team.
--
-C. Moya www.cmoya.com 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 about Option Strict?
What advantages do I get with Option Strict On?
Does better type statement make my code run faster?
If anyone knows THE ANSWERS! please fill me in. I have ideas and belief but
I would once and for all like to know what the...
|
by: Daylor |
last post by:
hi.
im using option strict on.
im doing in ,from the simple reason ,to be warn when there are implict
conversion like string to int ,int to string.
BUT.
the price ,(now i see ), is very bad.
if i have class CCar and interface ICar
when im doing this :
ICar = new CCar
|
by: Rich |
last post by:
Hello,
If I leave Option Strict Off I can use the following
syntax to read data from a Lotus Notes application (a
NotesViewEntry object represents a row of data from a
Lotus Notes View - like a record in a sql Server view)
....
Dim entry As Domino.NotesViewEntry
Dim obj As Object
str1 = entry.ColumnValues(0)
|
by: David |
last post by:
Hi all,
I have the following problem: my program works fine, but when I add option
strict at the top of the form, the following sub fails with an error that option
strict does not allow late binding. What should I do?
Public Sub MyMnuHandler(ByVal sender As Object, ByVal e As System.EventArgs)
If sender.checked = True Then sender.checked = False Else sender.checked = True
|
by: YYZ |
last post by:
After reading many messages in this group, it seems that the preferred
setting for this is ON. Okay, I did that in my project (first with
..Net -- long time VB6 developer) and now a bunch of problems have
cropped up. Most are easy to solve with using an explicit type cast
cType(whatever, whatever type), but some aren't.
Situation 1: I've got code that tries to get the itemkey of the
selected item in a combobox....
| |
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 a good thing.
i have now been asked to debug a vb2005 web app for 3 weeks and there is no
mention of option strict in it, (there are also no classes defined, just a
couple of structures) everything is define as 'as object', data coming back...
|
by: Poldie |
last post by:
How do I turn it on? I'm using vb 2005 in visual studio 2005 sp1.
In my web.config I have:
<compilation debug="true" strict="true" />
In my Tools/Options/Projects and solutions/vb defaults I have option
strict on.
In my .vb file I have:
|
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 man in question, in "Option Strict On" by
default.
Actually I don't believe I have code where this is not the case.
|
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 I do not have the time to fix
everything to set it to ON.
Anyway, my question is if its set to OFF why is it it keeps getting set back
to ON, everytime we move the package from one machine to another. It's the
Option Strict option specific to...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |