473,378 Members | 1,421 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,378 software developers and data experts.

override Convert.ToInt32(String value)

zybernau
hi all,
i need to override the function from convert.ToInt32(String value).
can you guys tell me wat are all the possible ways to do that.?

thanks
raj
Oct 6 '08 #1
4 2776
Plater
7,872 Expert 4TB
What do you mean by override?
You mean like how Int32.Parse() can take in extra parameters to allow for non-numerical characters?
Oct 6 '08 #2
Curtis Rutland
3,256 Expert 2GB
Well, you can't directly override it, because you can't derive from the Convert class. Static classes can only derive from Object, and non-static classes can't derive from static ones, which Convert is.

You would have to write your own function to mimic this one.
Oct 6 '08 #3
Well, you can't directly override it, because you can't derive from the Convert class. Static classes can only derive from Object, and non-static classes can't derive from static ones, which Convert is.

You would have to write your own function to mimic this one.
Thank you alias..
i tried the same thing then flopped and now i'm settled with my own function
changed the name from Convert.ToInt32("") to ConvertToInt32("") :)
Oct 6 '08 #4
Curtis Rutland
3,256 Expert 2GB
Glad you figured it out.
Oct 6 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Nathan | last post by:
Is there a way to convert a string to a CipherMessage? I am calling a function that decrypts a CipherMessage and returns the value. The only problem is when I want to use an encrypted value stored...
3
by: winthux | last post by:
How can I convert string i.e. to integer or to unsigned integer, or to other types?
3
by: Martin | last post by:
Hi, How can I convert a string type to a number, f.example an Interger? Thanks Martin
2
by: Learner | last post by:
Hello, I am trying to store the data entered in a webform in the database. I have few Int and one SmallDateTime filed in my table in SQL Server 2005 database. I have made a storedproc to store the...
3
by: Ursula | last post by:
Is it possible to convert a string in a file. The problem is this: I have an object string that is a file xml and I want to pass to Deserialize function, but Deserialize function expect an object...
3
by: Shawn Ferguson | last post by:
Hello All, I'm trying to do what I would think would be simple and straightforward, but it is not. I have a 2 textbox on a form, a label, and a button, when I click the botton I want to add the...
15
by: shiniskumar | last post by:
How to convert string to double? Ive got a double variable dTot; its value is 5.037717235E7 when i did FreemarkerTools.formatDecimal(dTot) i got it as string "50377172.35". now i want to...
13
by: deepthisoft | last post by:
hai, I want to convert String to int.My coding is like this, rs=stmt.executeQuery("select a from mailtable"); rs.absolute(-1); String id=rs.getString("a"); System.out.println(id);
9
by: engteng | last post by:
How do I convert string to numeric in VB.NET 2003 ? Example convert P50001 to 50001 or 50001P to 50001 but if P is in middle then not convert. Regards, Tee
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.