|
improved to do....?
|
|
|
|
|
I want to make it smaller and faster.
|
|
|
|
|
Once again, what does this expression DO?
Smaller and faster is directly influenced by the quality of the data that this expression is supposed to parse. If the incoming data is tight and follows formatting rules properly, then you can probably relax the expression a bit. But if the data is messy, your expression is going to have to be written to deal with that mess.
So, unless you get more specific about what this expression is supposed to do and with what quality of data, there's nothing we can do to help you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It finds all the words which start with _ or letter and contains only _ letters numbers.
|
|
|
|
|
In that case, no, it can't be done any quicker.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
|
Hi,
I have a situation where WIN CryptAPI functions are used in C#.Net for Encryption and Decryption.
System.IntPtr (.NET Type) is used for defining the prototype of the CryptAPI functions at the time of importing the "advapi32.dll" using "DLLImport".
As doing so, will my code be under the control of the CLR i.e Managed Code or will become an Unmanaged Code (Not under the control of the CLR).
I shall be thankful for the following clarification:
When the code written in C#.NET will be Unmanaged?
1. when Win API's are used in C#.NET
2. when System.IntPtr is used.
3. when C# pointers are used.
4. combination of any above.
Thank You,
Subrahmanyam.
|
|
|
|
|
Subrahmanyam Kallakuri wrote:
As doing so, will my code be under the control of the CLR i.e Managed Code or will become an Unmanaged Code (Not under the control of the CLR).
I shall be thankful for the following clarification:
When the code written in C#.NET will be Unmanaged?
1. when Win API's are used in C#.NET
2. when System.IntPtr is used.
3. when C# pointers are used.
4. combination of any above.
None of the above. C# runs in the CLR environment no matter what happens. It can makes calls into unmanaged code (i.e. Win32 API functions) that the CLR can only partially control, like passing parameters back and forth, but your C# code NEVER becomes unmanaged. The CLR, of course, can't control what happens outside of the managed environment, like what the unmanaged function does or doesn't do correctly.
If you call unmanaged code, your code is still repsonsible for calling that code correctly and abiding by the requirements that unmanaged code has. If the caller is supposed to call another function to free resources, then your managed code still has to call whatever function to free those resources. Calling into unmanaged code does NOT magically make your C# code unmanaged.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
is it not supported?
iam getting the following error:
[edited error message as i was feeling lazy to write all text]
System.data.oledb doesn`t support oledb provider for ODBC(MSDASQL)
and the connection which threw the exception is given below:
Provider=MSDASQL.1; Persist Security Info=False;Data Source=Adnan;Initial Catalog=C:\iconfigAlso notice that Initial Catalog didnt add .mdb extension in end
if there is no support then why was it mentinoed in the dataLink Provider list?
the Oledb provider for same Access works fine
kindly guide me
-adnan
|
|
|
|
|
Hi all,
I want to pass chunks of binary data from client to server by http protocol, and I need to write C# for both the client and http.
And I want to ask what is the difference of the following two approaches,
1. using the methodology as in web browser form for uploading files to server (i.e. treat each chunk of binary data as a file)
2. encode the binary data into stream and put at the multipart of
the http stream
Are the two methods actually using the same mechanism or any different between the two ?
Thanks
|
|
|
|
|
|
I am developing a small application (a translator and dictionary) that will translate and find the meaning of the word in my mother-tounge Punjabi.
I have a GUI.cs a windows form that has got a label meaning. i want to display the text of the label with a custom font that is ttf file in the application dir
Can somebody help me.
NAVI SIDHU
UNI OF CANTERBURY
CHRISTCHURCH - NZ
|
|
|
|
|
|
hi,
the vlaues from datatable to datagrid are transferred , the problem is that when i transfer value second time, from datatable to datagrid, it overrides the first valuues of datagrid.
can u tell me how can i append values in a datagrid by using a datatable.
the code snap is like this
private void btnadd_Click(object sender, System.EventArgs e)
{
frmapp_academic_record obj = new frmapp_academic_record();
obj.ShowDialog();
if (obj.flag == true)
{
dgridacademic_record.DataSource = obj.dt.DefaultView;
}
}
|
|
|
|
|
Why not just pull the information out of the datagrid,. add it to the data in your table then update the datagrid with the new information.
Kev
|
|
|
|
|
In MSDN I find this clause, but I don't know what it means.
if ((e.Effect & DragDropEffects.Move) == DragDropEffects.Move)
What's the difference about the following:
if (e.Effect == DragDropEffects.Move)
Please help me !
hope for help
|
|
|
|
|
DragDropEffects is an enum with the Flags attribute set. This means a single variable can hold more than one value of this enum.
E.g. you can assign: DragDropEffects myVar = DragDropEffects.Move | DragDropEffects.Scroll
Now the comparison myVar == DragDropEffects.Move will return false. To test if some variable with a flags enum has one special value set (and assuming other values are not interesting) you will have to use the comparison shown in the MSDN.
|
|
|
|
|
The DragDropEffects enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
You have to compute the bitwise AND before comparing, cause otherwise this comparison if (e.Effect == DragDropEffects.Move) returns false as soon as DragDropEffects.Move is combined with another member of the DragDropEffects enumeration.
www.troschuetz.de
|
|
|
|
|
I have 2 applications, and I want them to get data from 1 udp port say 5855, how can I do it ?
|
|
|
|
|
Hi
First of All thanks to heat to give another kind answer of my previous post:
1)ok,i have a datagrid on a form and what i want to select a column and it opens a form and then i want to pass dataGrid value to another Form..i can fetch dataGrid value on Select but when i am trying to pass Opened Form it givs following error:
G:\ITracker Enterprise Server\mainPanel.cs(574): Cannot pass 'ITracker_Server.ViewAll.Preference_ID' as ref or out, because 'ITracker_Server.ViewAll.Preference_ID' is a marshal-by-reference class
i am calling other class whuch is under same NameSpace like this:
ViewAll va=new ITracker_Server.ViewAll();
MessageBox.Show(va.Preference_ID.ToString());
where Preference_ID is a protected variable
i got some clue on following site:
http://www.geekpedia.com/forums/topic.php?id=14&id_forum=1&start=0[^]
but i dont want to use TextBox for this..any other Tip?
i have another question but will post after solving this problem
|
|
|
|
|
ok i solved it by assigning other class members public and then call them in form where i wanted to use them
but i am still intrested to know about mentioned error.
|
|
|
|
|
How to disable the application close icon (on the right top corner) in C# ????
saleem
|
|
|
|
|
A few days ago there was an article titled "dissecting the messagebox".
Search the articles for it, it has an explanation on how to disable the "X" (needs interop).
mav
|
|
|
|
|