VS 2010 Obsolete Property

Sep 27, 2009

I got this warning:

Quote: Warning1'Public Property Address() As Long' is obsolete: 'This property has been deprecated. It is address family dependent. Please use IPAddress.Equals method to perform comparisons. http://go.microsoft.com/fwlink/?linkid=14202'E:\_Visual Studio_2008VBPingerclassPingerpingerbib.vb16738pingerbib

with this

Dim ipaddress As IPAddress
Dim ip As Integer = CInt(Net.IPAddress.Parse(IP_adresse).Address

View 5 Replies


ADVERTISEMENT

VS 2010 XmlDataDocument Obsolete?

May 18, 2011

I just found out that the XmlDataDocument will be obsolete.I have the code below wich retrieves connection data from a very simple xml file:

Public Sub ReadXML()
Dim xmldoc As New XmlDataDocument()
Dim xmlnode As XmlNodeList
Dim i As Integer
'Dim str As String

[Code]...

View 3 Replies

IDE :: Make A Property In A Property Grid A List Box In 2010?

Feb 21, 2011

I have the following property in a property grid in VB.Net 2010.

<Description("Rapid Entry Post Car Wash Settings CarWashOptionPushButtons"), _
Category("Post Car Wash")> _
Public Property CarWashOptionPushButtons() As String

[code]....

I need to make this property a list box that gets the values from a database table and populates the list box with the values from the table. I have tried numerous things to no avail.

View 4 Replies

Encryption And An Obsolete Warning

Oct 26, 2011

I wanted to know how to encrypt data.And I've found a solution at this web site.This script works if I use it as a function.Nonetheless, Visual Studio throws a warning that says the following.[code]Visual Studio underlines the second line after the equal symbol above.I have no idea what that means.Does anybody have any idea how I can resolve this warning?

View 6 Replies

Suppressing Obsolete Warnings In .Net?

May 13, 2009

I have VB.Net code in VS 2008 using an obsolete method, and would like to suppress the warning.Unfortunately, following the recommendation is not a good solution, because it requires using a different class, which works differently, in important ways.I'm trying to suppress the warning using System.Diagnostics.CodeAnalysis.SuppressMessage, but I don't know what to write as the parameters for the attribute, and can't find any relevant reference.

I should also say that, right-clicking on the error in the error list I don't have any 'Suppress Message' option.

View 2 Replies

Asp.net - Replacing The Obsolete System.Xml.XmlDataDocument?

Sep 20, 2010

I have a System.Web.UI.WebControls.Xml control (Xml1) in a webforms app that I have upgraded from .NET 2.0 to .NET 4.0

I am getting two warnings from the code-behind page that I'd like to do something about.

...
Dim ds As DataSet = app.GetObjects
Dim xmlDoc As New System.Xml.XmlDataDocument(ds)
Xml1.Document = xmlDoc

[Code].....

View 2 Replies

C# :: Possible To Mark .net Function With Obsolete Attribute?

Aug 8, 2011

I have created a few WebRequest extension methods that support cancelling. Is it possible to mark related .net framework methods as Obsolete. That will allow other developers to get warning and encourage them to use a new extension methods.

View 3 Replies

Find A Multithreading Example That Won't Show Up As Obsolete?

Aug 5, 2009

I have VB 2008 and am trying to find a multithreading example that won't show up as obsolete. (seems like most examples are releavant for vb 2005) I found an example on the back ground worker. Is this true multi threading?I am working on a project that needs to go out and get data often but still allow the user to interact with the menus and graphics.

I'd like to put the data grabbing on a timer on a seperate thread. how to make a timer and related data grabbing a seperate thread so I don't have "starts/stops" in the gui?

View 7 Replies

Fix RegisterClientScriptBlock Is Obsolete Warning In Visual Studio?

Jan 29, 2011

I have the following Sub Routine in my vb.net project which runs fine, but I constantly get build warnings:

'Public Overridable Sub RegisterClientScriptBlock(key As String, script
As String)' is obsolete: 'The recommended alternative is
ClientScript.RegisterClientScriptBlock(Type type, string key, string

[code].....

View 2 Replies

GetHostByAddress Obsolete ... But Replacement Doesn't Always Work?

Feb 25, 2012

When using: vb System.Net.Dns.GetHostByAddress it states that it is obsolete, and to use GetHostEntry instead. But for some IP's this errors whereas GetHostByAddress does not... for example:

[Code]...

View 3 Replies

List Obsolete Classes / Methods In Msbuild

Jun 28, 2010

I have upgraded a visual basic 2005 project to visual basic 2010 (.net framework 4.0). I want to list all obsolete functions used in this project in order to change it with newer ones. How can I treat obsolete functions warnings as errors in visual basic 2010 ms-build?

View 1 Replies

Mark Native Methods As Deprecated / Obsolete?

Aug 22, 2011

In .NET you can mark certain methods as obsolete so that developers are alerted when they attempt to use the deprecated method.

<Obsolete("Do not call this method.")> Private Sub FormerMethod()

The thing is you can only do this within classes you control. What do you do when you want your developers to avoid using certain methods on classes provided natively in .NET or by a vendor?

For example, what if you want your developer to prefer some custom extension method on DataTable rather than Select. I'd hate to have to define a custom version of the DataTable class if only to deprecate Select. That would leave us having to police whether or not the custom table was being used.

View 1 Replies

Suppress Obsolete Warning On Factory Method In .net

Apr 30, 2009

Is it possible to prevent compiler warning caused by a static factory method returning an instance of an obsolete class? For example if an instance of an obsolete class (Foo) is created through a static method (Create) a compiler warning is caused by the factory method.

<Obsolete()> _
Public Class Foo
Public Shared Function Create() As Foo

[code]....

In C# the warning could be suppressed using "#pragma warning..." but I don't think that this exists within VB.Net. Migrating to C# is not an option due to business requirements.

View 2 Replies

Suppress Obsolete Warning On Factory Method In .net?

Jan 21, 2011

Is it possible to prevent compiler warning caused by a static factory method returning an instance of an obsolete class? For example if an instance of an obsolete class (Foo) is created through a static method (Create) a compiler warning is caused by the factory method.

<Obsolete()> _
Public Class Foo
Public Shared Function Create() As Foo

[code]....

In C# the warning could be suppressed using "#pragma warning..." but I don't think that this exists within VB.Net. Migrating to C# is not an option due to business requirements.

View 1 Replies

RDLC Making Call To Obsolete SecurityAction Enumeration

Nov 23, 2011

I'm using Microsoft.Reporting.Webforms version 10 in order to parse an RDLC file and produce a PDF. The RDLC is a simple invoice with a couple of embedded expressions. When I run the application I get an exception that a call to the obsoleted SecurityAction.RequestMinimum has been made when compiling the expressions. Is this a known bug or something I can remedy?

[Code]...

View 2 Replies

Threading In Shared Function GetCurrentThreadId Obsolete/deprecated?

Aug 13, 2007

Here is a VB.NET Console module I'm testing to understand how Multi-Threading/Threads work.

Imports System
Imports System.Threading
Module Module1
Public Class SimpleThread
Public Sub SimpleMethod()

[Code]...

View 3 Replies

Warning: 0 : Use Procedure Bodies Is Now Obsolete.Use Check Parameters Instead

Apr 2, 2012

I'm getting this warning in my Output window (which doesn't affect functionality but I don't really understand it:

Warning: 0 : Use Procedure Bodies is now obsolete.Use Check Parameters instead

I'm using MySql.Data 6.3.7.0?

View 1 Replies

.net - 'Property' Cannot Implement 'Property' Because There Is No Matching Property On Interface 'IName'?

Dec 9, 2011

I'm having some very weird issues with interfaces right now.

I have a very simple setup. In one of my class, I have a Property implementing a Property from an Interface.

In my class it's like:

Private _oForm As IForm
Public Property Form As IForm Implements IContainer.Form
Set(value As IForm)

[Code]...

I have like dozens of interfaces like this working throughout my project and I can't believe this simple one can't work!

View 1 Replies

Project Give "obsolete" Warnings, While The Other Does Not?

Aug 15, 2011

I have two very similar vb.net projects. Both have recently been converted from .net 1.1 to 3.5.In one, the following code gives no warnings. In the other I get a warning when I try to set the parameters of the mysql command object:

[Code]...

If I follow the instructions, and use "AddWithValue" instead, the warnings go. But I can't figure out why I don't get these messages in the first project. It seems there is something different in their configuration, but I can't figure out what. Both use the same version of mysql.data.dll. And both are configured to show warnings in the same circumstances via the project>properties>compile menu. Can anyone suggest where else to check?

View 1 Replies

VS 2010 Adding A Property?

Jan 22, 2011

I have quite a few GroupBoxes and a large number of controls in each. The GroupBox control does not have a changable border color however I found this code on the internet.

Public Class myGroupBox
Inherits GroupBox
Private _borderColor As Color

[code]....

But to add the border to a GroupBox I must put the myGroupBox control in place of each existing GroupBox.Essentially, I there an easy way to give my existing GroupBoxes a border as redesigning my form with the new GroupBoxes is out of the question?

View 4 Replies

VS 2010 DataGridViewComboBoxCell Tag Property?

Apr 24, 2011

I'm getting some data from a database and I'm setting them to a DataGridViewComboBoxCell. I also need to set the Tag property of each DataGridView ComboBoxCell item to a specific value, so later, I can query the DB with those two items.The issue, is that I can't seem to figure out how to access the DataGridViewComboBoxCell Item's Tag property.[code]I wrote it on the spot and it wasn't until later that I realized that I'm setting the Tag property of the DataGridViewComboBoxCell itself and not the DataGridViewComboBoxCell's Items.

View 7 Replies

Obsolete Codedom Compiler New Method Of Compiler?

Nov 11, 2010

Imports System.CodeDom.Compiler
Public Class iCompiler
Public Shared Sub GenerateExecutable(ByVal Output As String, ByVal Source As String, ByVal Icon As String)[code].....

View 4 Replies

Excel 2010 Value Property For VS 2005

Feb 24, 2011

I'm recreating a program (don't ask - it is embarrassing) in Visual Studio 2005 VB where I read a spreadsheet in an then select values from certian rows. I added the Interop reference and the MS Excel 14 object library, but when I type something like:

Public oSheet as Worksheet
...
x=oSheet.Cells(Row,1).Value.ToString

I'm concerned because when I type the period after the ) it does not allow me to select value. I type it in and it does not give an immediate syntax error but I'm guessing that when I try to run this, it will fail the build. Is there an other reference I need to add or do you get the value of a field differently for Office 2010 than we did for Office 2007?

View 2 Replies

VS 2010 Coding A Property In A Class?

Nov 5, 2010

Do you need 2 values in a Set procedure if you are using a Point as a data type in declaring a property?Because Point has two values the (X, Y) right?

Private Property CurrentPosition As Point
Get
Return m_currentPosition
End Get

[code]....

View 1 Replies

VS 2010 Defining A Property As A Dictionary?

Sep 29, 2011

I am trying to create a property and declare it as a dictionary. This property will be updated and called upon throughout my project. I may be complicating the issue but here is what I have...

vb.net
Private Shared m_ItemName As Dictionary(Of Integer, String)
Public Shared Property ItemName(ByVal Tkey As Integer, Tvalue As String) As Dictionary(Of Integer, String)
Get

[code]....

What I wish to do with the dictionary is to keep a record of the amount of items selected, the Key will be the Integer in the dictionary and will be the ID of that item in a database while the String will be the name of the item matched to that ID in the database.The user will be allowed to enter up to no more than 10 items at a time (overkill but necessary for the unknown).I was originally going to use an array statically declared allowing up to 10 items (eg. Private Shared m_ItemName(,) As String = New String(9,9) {})

View 14 Replies

VS 2010 Loading An Object Property?

May 31, 2012

This question is more of a fundamental question then anything.

I've got a custom object collection, lets call it People, that holds my Person class objects. The Person class has a property called Phone Numbers. The Phone Numbers property is a custom object collection of phone numbers that are retrieved from another table. So...

Private People as BindingList(Of Person)
Class Person
Private mName as string
Private mPhoneNumbers as oPhoneNumbers

[Code]....

I'm inclined to go with option #1 because option #2 would make a lot of calls to the database if there are a lot of persons living in New Jersey.

View 3 Replies

VS 2010 Make A Property Page?

Dec 30, 2011

I'm in the process of making a usercontrol and i've run into the problem of how to make a property page. Obviously this makes setting up you control nicer and more importantly to my program makes loading the form faster (setting the properties in the load event vs property page). I was trying to find something to start on but i didn't find a propety page in the "New Item" menu or even something like the "Property Pages" property of a usercontrol in vb6 where i've done this before. How can i make the equivalent of the vb6 property page in vb.net? Maybe with a form or a dialog?

View 6 Replies

VS 2010 Optional Parm In Property?

Jan 8, 2012

am trying to add an extra optional parameter to a property but it gives this message.Specifiers valid only at the beginning of a declaration. Public ReadOnly Property ReadValue(ByVal Selection As String, ByVal Key As String,Optional Default as string="") As String

View 3 Replies

VS 2010 Property Info And PropertyTypes

Jan 22, 2012

I am experimenting with Property info and getting their values etc. The below code gets the properties of a layertable record and creates my PropertyListViewItem

Dim ltr As LayerTableRecord = DirectCast(obj, LayerTableRecord)
For Each prop As PropertyInfo In ltr.[GetType]().GetProperties().OrderBy(Function(p) p.Name)
Try

[Code].....

I have a combo box appear if I click on an item that is not read only. What I want to do is populate that combo box with the values it can accept. ie If it is a boolean, add True and False etc.

View 1 Replies

VS 2010 ReadOnly Property Or A Function?

May 17, 2011

In my class there's an object belonging to Process class. So, in my wrapper class, I need to get the "StartTime" & "EndTime" of the process object. I'm having confusion whether to use a ReadOnly property for this or a function returning the date, in my wrapper class

Is it a good practice to use a function for this purpose or a property ?

[Code]...

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved