Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
It`s been said that converting string variables to numeric variables and vice versa is bad programming practice, and that option strict on should be used. Why is that?
Posted
Option strict basically disallows any implicit conversions of data types. The reason for this, is that somewhere down the line (usually after you've already deployed the application), converting one type to another type might cause undesired results and hence, crashing your application. So with Option Strict On, you are not allowed to build your solution/project if you have implicit conversions. Try using CType(STRING, INT) or vice-versa, so you aren't implicitly converting data types.
If it works... don't worry, I'll fix it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...