473,480 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Strange vb Like operator

Try this:

Console.WriteLine(("ab" Like "*a*b*").ToString)
Console.WriteLine(("aa" Like "*a*a*").ToString)

Result:
True
False

???????????

Jan
Nov 20 '05 #1
2 973
* "Jan Sika" <an*******@discussions.microsoft.com> scripsit:
Try this:

Console.WriteLine(("ab" Like "*a*b*").ToString)
Console.WriteLine(("aa" Like "*a*a*").ToString)

Result:
True
False

???????????


Don't use 'Like'. 'Like' is buggy!!!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Jan,
In addition to Herfried's comments.

Have you considered using System.Text.RegularExpressions.RegEx instead?

I'm not sure RegEx would fair any better, without tweaking your expession to
match against...

Hope this helps
Jay

"Jan Sika" <an*******@discussions.microsoft.com> wrote in message
news:07****************************@phx.gbl...
Try this:

Console.WriteLine(("ab" Like "*a*b*").ToString)
Console.WriteLine(("aa" Like "*a*a*").ToString)

Result:
True
False

???????????

Jan

Nov 20 '05 #3

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

Similar topics

4
5591
by: Ben | last post by:
Hi all, I'm trying to figure out how how complex map, filter and reduce work based on the following piece of code from http://www-106.ibm.com/developerworks/linux/library/l-prog.html : ...
2
1577
by: Jason Heyes | last post by:
The following program does not compile. Apparantly "t" is inaccessible. #include <iostream> using namespace std; template <class T> class Foo { T t; public: Foo(T t_) : t(t_) { }
2
1301
by: Gernot Frisch | last post by:
This code: class A { #define MK_OPERATOR_CL(zz) \ DGStr& operator zz=(const DGStr& a); \ DGStr& operator zz=(int a); \ DGStr& operator zz=(float a); \ DGStr& operator zz=(double a); ...
4
1659
by: Prawit Chaivong | last post by:
Hi, gurus I've overloaded new operator. and I found that size is strange. It's more than sizeof(myClass) 4 bytes. Where does it come from. I don't know the other compilers do the same thing....
2
8904
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
3
2325
by: Bruno van Dooren | last post by:
Hi All, i have some (3) different weird pointer problems that have me stumped. i suspect that the compiler behavior is correct because gcc shows the same results. ...
7
1909
by: dam_fool_2003 | last post by:
#include<stdio.h> int main(void) { unsigned int a=20,b=50, c = sizeof b+a; printf("%d\n",c); return 0; } out put: 24
4
1290
by: Harlan Messinger | last post by:
Since operator overloads into static functions in C#, there really doesn't need to be a connection between the types to which the operator is being applied and the type in which the overload is...
4
3702
by: Yuri CHUANG | last post by:
This is a example from a textbook,but there are some strange error that I don't understand.Could anyone give me some help to realize the operations on set.Thank you very much:-) (I compile it with...
28
2048
by: charlie | last post by:
Hi, I found an article on informit.com that talks about C++ casts http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=285&rl=1 The strange thing is the author says the following...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7084
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6739
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
181
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.