Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS2012 - Option Strict and Option Explicit don't always perform the same

$
0
0
I just ran into something weird. I always set my projects to Option Strict ON and Option Explicit ON.

I have a large project that has absolutely no problem with code similar to below. However, I just started a new project and now I get a build error that says "Option Strict On disallows implicit conversions from Double to Integer."

So my question is, with both projects set up the same, why does one allow this while the other will not?


vb.net Code:
  1. Private Sub LoginFrm_Resize(sender As Object, e As EventArgs) Handles Me.Resize
  2.         Me.LoginPanel.Location = New Point((Me.Width - Me.LoginPanel.Width) / 2, _
  3.                                            (Me.Height - Me.LoginPanel.Height) / 2)
  4. End Sub

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>