|
I think, and only i think.. that .NET not capable to do that... so you could do it manually... using the string methods and check if the string is numeric or not, then you could run the validation as an expression....
or you could ask the MSDN
...Miliaware
..Faris Madi
-- modified at 20:16 Thursday 24th November, 2005
|
|
|
|
|
As militiaware writes, the Regex capabilities in .NET do not offer the option to find the place where the Regex fails to match.
However, you could write your own regular expression parser to find the "best match" to your string and, then, you will know which character failed.
I recommend this book, especially Chapter 8, "Parsing Regular Expressions":
Title: Building Parsers With Java
ISBN: 0201719622
Though the code and examples are in Java, you can easily translate it to the .NET-supported language of your choice.
The design of his parser has a bestMatch() method that will return the string that best matches your given input, in this case, "[0-9][0-9]-[0-9][0-9][0-9]".
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
I have a solution which has projects dependent on SSPI (Security Support Provider Interface ).
When I try to build the solution from vs.net command prompt using following command I get "Invalid Solution Configuration" error:
"E:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" <solution path=""> /rebuild debug /out builddetails.log
I tried out by changing the "Platform target property" from "Any CPU" to "X86" but it is still giving the same problem. Also the "platform target property" for "SSPI" project always remains "Win32".
Same solution is compiling properly with vs.net 2003.
Any suggestion on how to proceed.
Hiral
|
|
|
|
|
In IDE open that solution to convert it.
|
|
|
|
|
Hi,
Thanks for the reply.
You have suggested to open the solution in IDE to convert.
I have already done that. When I compile from IDE it builds successfully.
But I get the error only when I try to build the solution from vs.net 2005 command prompt.
Also I tested with "E:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" <solution path=""> /rebuild "debug|X86" /out builddetails.log, it works fine.
For each library referring any COM component this is required. So how do we generalize it when a batch file runs.
Hiral
-- modified at 2:00 Monday 28th November, 2005
|
|
|
|
|
hi
How to print a form in c#.net. I would like to get the code. The code which i have is giving some trouble.
hope i get the help.
regards,
Sarayu.
-- modified at 1:47 Thursday 24th November, 2005
|
|
|
|
|
|
Hi,
I wants to retrieve values of the controls
Like Label,LinkButton,ValidationSummary ,etc
contained in server side htmltable's Cell & table is itself contained in serverside control Panel & all these code created in ascx page of my application.
So, Can u tell me how would i retrieve my controls values contained on the aspx webform..?
Thanks in Advance
Ami
|
|
|
|
|
I have an application in which i am trying to call some dll imported function that are exported using c++ calling convention. There are couple of function exported using c calling convention. When i import all those function in my application i am able to call functions that are exported using c calling convention but not able to call functions that are exported using c++ calling convention.
any help is greatly appreciated..
thanks, Ramendra
Ramendra K
|
|
|
|
|
I have a scenario similar to the following:
Assume a single assembly (SomeAssembly.dll) contains the following types:
1. Class B inherits from class A
2. Class A implements properties Moe, Larry and Curly, all of type ArrayList.
3. Class B implements a public interface containing all of the public members of both classes A and B.
The problem:
I export the type library for SomeAssembly.dll using
Regasm.exe SomeAssembly.dll /tlb:SomeAssembly.tlb /codebase
When I view the generated type library, I see that while properties Moe and Larry appear as "Moe" and "Larry" (their proper case is preserved), property Curly is exported as "curly" (all lower case). So far, I haven't been able to find an explanation for this behavior, and while the CCW works just fine, the name change is a little disconcerting for my client.
The only similar article I was able to find referenced a known issue whereby if there was another "curly" property that was written to the type library first, all following same-named properties would bear the lowercase name, but there is only one "Curly" property in my assembly.
Any ideas? Failing a solution, is there any attribute decoration I might use to force the proper case in the generated type library?
Thanks.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello
just looking for some advice really on how i should go about a project. Any help would be appreciated.
I have an application written in C# which accesses a mysql DB, it basically a reporting system keeps track of who is in work on what day etc. Has some options to print reports etc.
What i need to do is write a small app that can be installed on a seperate computer but uses the methods from the other application. Basically i just want this app to be use the print options on the other application and check whether the other app is currently running (there is a table in the database that has a flag when people are using the DB).
From what i can gather the .Net remoting is the best way to go about this?
Anyone know any smaple apps or good articles on the subject area, or any experinces on this kind of app ?
thanks in advance
ADAM
|
|
|
|
|
Hello I'm developing ADO.NET project with C#.net I can connecting to SQL Server with button but I want to Disconnect from server I can't checking SQL Sever Connection & I can't Dissconneting from server how can i checking SQL server connection?
Ahmed Erarslan
MCAD,MCDBA,MCP
MCSD.NET
|
|
|
|
|
Ahmed Erarslan wrote: I can't Dissconneting from server
Ahmed Erarslan wrote: MCDBA
hum, a DBA should know how to connect/disconnect to his database... !!!
or are you lying on you actual status ?!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
WTF is right.
What sort of question is this from somebody with MCSD.NET.
I dont have any Microsoft certs but if this is the value of them i wont bother.
Jon
|
|
|
|
|
What is the general consensus on this idea?
According to the series of videos I have been following on MS about designing class libraries, you really should not throw exceptions in property setters. But, if you don't then how are you to signal the user that you have set a value that is not correct?
For example I have a property that takes a Guid value. Inside the property I want to make sure that the value supplied is a correct Guid (ie: formatting, length, etc...) and I am using regex for that, but if I determine an incorrect value what should be the way I signal the user?
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
If you don't want to throw an exception, then you have to set a flag or make your whole object go into an indeterminate state. I'd be in favour of throwing an exception, but leaving the object in a 'clean' state, so it can still be used if that's what the client wants.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
That's what I am doing now. Just wondering if there is a more preferred method.
I am always looking for better ways of doing things.
Thanks.
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
I guess the idea behind the suggestion is that users of your class won't be expecting a simple property assignment to throw an exception.
If it's your own codebase, I guess it's fine then. Or, you can always change it to a method.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I am having a bit of a time trying to figure out which assemblies my application would like in order to run.
Actually, I am getting a CLR Debugging Services exception when I try to start the app. I know this happens when I am missing a referenced assembly. So I check the References -all of the DLL's listed there are contained in the GAC or in the application directory. The app of course runs perfectly on my development machine.
So I guess I have two questions.
1. Is there a way to capture in a log file which assembly the app died trying to load? The default "there was an error" message is just about useless.
2. I have looked in the .NET Config - Applications and checked the "Assembly Dependencies" listed under my app when I add it. There are several assemblies that are listed as being required multiple times (i.e. several versions???). I have no idea why this is happening. On my Dev. machine, these are listed only once with one single version. On the other "clean" machine (no VS, etc.) the dependencies show up multiple times - same executable.
How do I actually figure out what is happening here? Any insight on this would be greatly apprecitated.
thanks
khariV
|
|
|
|
|
This might help.
So might this.
And, if those don't help, try Reflector.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Hi,
My name is Liran, Im working on a project that the server is written in java technology (APACHE TOMCAT) and we considering now to turn the client to windows application instead of web. Our main option is to choose .net c# as our client technology and the connection to the server will be by web services on the server side (the webservices is written in java).
I already made a prototype to check it and it worked really good.
Im trying to get some information about the risks that i need to take into consideration if i choose this option. so if someone already dealt with it ill really appriciate your help.
Best regards,
Liran
|
|
|
|
|
Dear all,
The function System.Windows.Forms.Control.GetChildAtPoint(Point pt)
find control reference to the Control's Client Rectangle.
However, I am looking for a Control that is out of screen.
i.e. out of the Client Rectangle, but within the Display Rectangle.
Is there any method for me to get that Control by a Coordinate point?
Many Thanks.
|
|
|
|
|
Are you looking to get a control that sits on a different Form?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It is on the same form.
The control hierarchy is like this:
Form
|-Groupbox A
|---TextBox A
|
|-Groupbox B
|---TextBox B
However, the size of the Form can only show the Groupbox A. I have to scroll down in order to show another groupbox.
Now I have the coordinate of Groupbox B and TextBox B, can I get the control TextBox B by its coordinate point when the screen is still showing GroupBox A???
Many Thanks!!
|
|
|
|
|
You'll just have to try it. There is a chance that it might not work because it's not visible, and therefore, not being drawn.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|