473,320 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

isNumeric, among others

I couldn´t find the isNumeric function last night.
So I did my own.
But what do you think of Common Functions? What´s the best way to keep them
in my ASP.NET (C#) project?
One class PublicCode with them all? Just spread among all classes?

Thanx for any help!
--
Bernardo Heynemann
Developer ASP / VB @ Banco BVA S/A Brazil
E-Mail: be******@bancobva.com.br
Site: http://www.bancobva.com.br
Phone: (5521) 3231-1100 R:1237
Nov 15 '05 #1
1 1046
Bernardo,

The IsNumeric function is a function of VB, and you can find it by
setting a reference to Microsoft.VisualBasic.dll. The function is static,
and is on the Information class in the Microsoft.VisualBasic namespace.

As for common functions, I would make them static, and make sure they
are accessible, by placing them in a frequently-referenced assembly.
However, I wouldn't put them all on one class. Rather, I would place them
where they would be logically located. For example, if you have a Customer
object, and you have a static function GetCustomers, which gets lists of
Customer objects, I would make sure the GetCustomers method is on the
Customer class.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bernardo Heynemann" <be******@bancobva.com.br> wrote in message
news:u7*************@TK2MSFTNGP10.phx.gbl...
I couldn´t find the isNumeric function last night.
So I did my own.
But what do you think of Common Functions? What´s the best way to keep them in my ASP.NET (C#) project?
One class PublicCode with them all? Just spread among all classes?

Thanx for any help!
--
Bernardo Heynemann
Developer ASP / VB @ Banco BVA S/A Brazil
E-Mail: be******@bancobva.com.br
Site: http://www.bancobva.com.br
Phone: (5521) 3231-1100 R:1237

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: eje | last post by:
IsNumeric(value) should return false if value "can not be successfully converted to a Double." Instead I get the following error message: "Input string was not in a correct format." I use the...
14
by: Kenny | last post by:
Hello, I would like to know if the function IsNumeric requires a header like #include <iostream> to be functionnal thanks ken
10
by: crowl | last post by:
I have a pocket pc project in c#. From a textbox i have to verify if the input is numeric. I have found in the msdn a sample like this: textbox1.numeric = true / false. But this do not work in...
8
by: John Bowman | last post by:
Hello, Does anyone have a good/reliable approach to implementing an IsNumeric() method that accepts a string that may represent a numerical value (eg. such as some text retrieved from an XML...
7
by: Nathan Truhan | last post by:
All, I think I may have uncovered a bug in the IsNumeric function, or at least a misunderstanding on functionality. I am writing a Schedule Of Classes Application for our campus and have a...
7
by: Vikas Kumar | last post by:
For Each item In Request.Form If IsNumeric(item) Then Try Approved(item) Catch ex As Exception Response.Write(ex.Message) End Try End If Next
8
by: moondaddy | last post by:
What's the .net framework equivalent of the vb function isnumeric? If there isn't one, how can I test a string variable to see if its a number or not? I don't want to use isnumeric if possible ...
12
by: sck10 | last post by:
Hello, I am trying to determine if a value is NOT numeric in C#. How do you test for "Not IsNumeric"? protected void fvFunding_ItemInserting_Validate(object sender, FormViewInsertEventArgs...
17
by: MLH | last post by:
I have tested the following in immed window: ?isnumeric(1) True ?isnumeric(1.) True ?isnumeric(1.2) True ?isnumeric(1.2.2)
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.