|
private Boolean CompareStrings(String firstString, String secondString)
{
return true;
}
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
"someString".IndexOf("some") != -1
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I have problem with Multiline TextBox. I have activex component with textbox on website. On this site i have too menu maked in css. When i show menu my textbox blinked. In textbox without multine option is ok.
|
|
|
|
|
how can i read the whole class information using C#?
means, i need All class name under a .cs file, there property, field, methods etc.
I have tired using Reflection ,But It will generate in runtime !!!! But i need designed time Just like Class Designer in .NET.
I am studing on DTE and Codemodel of VS.NET,
can you kindly help me do it !!!!
Any Idea !!! Any Reference !!!
Thanks in Advance !!!!!
|
|
|
|
|
If it is at design time, then why can't you just LOOK at the classes within a .cs file? Just import the namespace and use the classes. What exactly are you trying to do?
-Jeff
|
|
|
|
|
Skippums wrote: What exactly are you trying to do?
I want to draw UML diagram from a .cs file. Like Class Diagram. It will be a Addin in .net. Now I thing it is clear for your. So any suggestion for do it !!!!
Any kind of idea!!!!
Thanks in advance !!
|
|
|
|
|
The designer does compile to get its information. Sometimes this can be noticed by the strange cryptic message when viewing a designer file.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I developed an application that uses an MS Access database to store test results, various parameters and other information needed for performing some the tests in question. All of that information needs to be preserved when updating (or upgrading the application).
However, the nature of the upgrade may involve some changes to the underlying database structure (an additional data table, new field names, etc), that also needs to get updated. So, I do want to deploy a default database with each application installment, but want to preserve the data from the database utilized by the previously installed application.
At present, I preserve this data by performing a few actions after installation that save the deployed database to a different location and point the application to that location. When I provide an upgrade, the default database is targeted for the application startup path and the first login using the upgraded something will tell the user whether the database needs upgrading. If it does, the user must import the existing data into the default database in the application path, then relocate the default database elsewhere, a multi-step process that functions reasonably well, but is less user friendly than I would like.
Is there, then, a method to import a database structure without changing the existing data itself (provided there are no subtractions or editing of datatable and field names, only additions)? Thanks.
|
|
|
|
|
polishprogrammer wrote: Is there, then, a method to import a database structure without changing the existing data itself (provided there are no subtractions or editing of datatable and field names, only additions)? Thanks.
I will answer your question by asking you a question. If you have an existing database in MS Access ( by existing I mean tables and rows in the tables), can you use MS Access to add new tables, new columns to existing tables without losing the existing tables and rows? The answer is yes is it not?
Does that answer your question?
|
|
|
|
|
It answers the question at face value, more or less. My question had to do more with the mechanism for updating the database from C# code. I brushed up on my SQL a bit this morning and found the ALTER TABLE ADD COLUMNNAME command which works if I always know exactly what column names to add, but I want to automate the process.
Basically, I'm look to set up a mechanism that will search all the tables in the database if the software version has changed and compare the table definition for each table in the existing database with the table definition for each and every table in the database that will deploy with the newer version of the software to determine if there are any changes to the database. If so, then I need to execute the ALTER TABLE ADD COLUMNNAME command to add those new fields to the existing database.
Now, I can perform this process through some brute force type of programming, where I get the schema for each table in the newer version of the DB, compare it to the scheme for each table in the existing version of the DB, and then update the data accordingly, but if there's a more efficient way to accomplish the task, I would be glad to hear it.
|
|
|
|
|
Hello.
The MSDN says:
"This implementation of CMS/PKCS #7 supports only one level of countersignature. That is, a signature can be signed, which forms a countersignature, but that countersignature cannot be signed again."
( http://msdn2.microsoft.com/en-us/library/yeayfsh9.aspx[^] )
So, how do I, in C#, compute a CounterSignature of a CounterSignature, and add this new CounterSignature to the SignedCms ?
The RFC3852 says:
"11.4. Countersignature
The countersignature attribute type specifies one or more signatures
on the contents octets of the signature OCTET STRING in a SignerInfo
value of the signed-data. That is, the message digest is computed
over the octets comprising the value of the OCTET STRING, neither the
tag nor length octets are included. Thus, the countersignature
attribute type countersigns (signs in serial) another signature.
The countersignature attribute MUST be an unsigned attribute; it MUST
NOT be a signed attribute, an authenticated attribute, an
unauthenticated attribute, or an unprotected attribute.
The following object identifier identifies the countersignature
attribute:
id-countersignature OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs9(9) 6 }
Countersignature attribute values have ASN.1 type Countersignature:
Countersignature ::= SignerInfo
Countersignature values have the same meaning as SignerInfo values
for ordinary signatures, except that:
1. The signedAttributes field MUST NOT contain a content-type
attribute; there is no content type for countersignatures.
2. The signedAttributes field MUST contain a message-digest
attribute if it contains any other attributes.
3. The input to the message-digesting process is the contents
octets of the DER encoding of the signatureValue field of the
SignerInfo value with which the attribute is associated.
A countersignature attribute can have multiple attribute values. The
syntax is defined as a SET OF AttributeValue, and there MUST be one
or more instances of AttributeValue present.
The UnsignedAttributes syntax is defined as a SET OF Attributes. The
UnsignedAttributes in a signerInfo may include multiple instances of
the countersignature attribute.
A countersignature, since it has type SignerInfo, can itself contain
a countersignature attribute. Thus, it is possible to construct an
arbitrarily long series of countersignatures."
Somebody can help me? Again:
How do I, in C#, compute a CounterSignature of a CounterSignature, and add this new CounterSignature to the SignedCms ?
|
|
|
|
|
Hi
How do you put a string value in sql statement
for example
select * from table where tablename = string(tablename)
something like thta
cheers
|
|
|
|
|
Isn't it single quotes (')?
-Jeff
|
|
|
|
|
no this didnt work either
any more suggessiotns?
|
|
|
|
|
found it:
use this '" + string + "'
|
|
|
|
|
Jamie1985 wrote: select * from table where tablename = string(tablename)
<code>select * from student where name = '" + txtname+ "' </code><pre>
|
|
|
|
|
HI,
i'm sending messages from App1 to App 2 in TCP/IP
the thing is that first collect all info and rhen sends it little Messages
App2 reads the MSG One By One and display
the Thing is that when i debug all the MSG arrives (or get there in time)
but when i run the EXE and send info To App2, not all the Info Arrives
About (70%!!!!!!!!!!!!!!!) Lost, how can i Get Each MSG
i'm using :
<br />
connectionSocket = new Socket(AddressFamily.InterNetwork,<br />
SocketType.Seqpacket,<br />
ProtocolType.Tcp);<br />
<br />
<br />
ipAddress = IPAddress.Parse(runnerTcpIP);<br />
<br />
ipEndPoint = new IPEndPoint(ipAddress,int.Parse(runnerPortNumber));<br />
type of connection with Begin/EndConnect
Send/Recieve
THANKS
Have Fun
Never forget it
|
|
|
|
|
half-life wrote: connectionSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Seqpacket,
ProtocolType.Tcp);
Use SocketType.Stream instead.
________________________________________________________________
There are 10 kind of people: those who knows binary and those who doesn't.
|
|
|
|
|
Did It
Still Not Working
THANKS Anyway
Have Fun
Never forget it
|
|
|
|
|
I suspect you're expecting message boundaries to be preserved, that is, the data from one Send to appear in one Receive. TCP doesn't work like that. I suggest you read How to use TCP effectively[^] and the rest of the Winsock Programmer's FAQ[^]. It's C-oriented, but still makes sense for a .NET programmer.
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
mmmmmmmmm,
THANKS man.
i need to build a header to identify where a MSG begins
and where it ends
Have Fun
Never forget it
|
|
|
|
|
Hi,
How can I change the color on particular cell of dataGridView?
Thank you in advance
(Riaz)
|
|
|
|
|
In the data grid, you will have to create custom column styles classes derived from DataGridColumnStyle) which would paint the background based on the row that you want to highlight. The DataGrid is very column-based, so doing something like changing the row highlighting is difficult, to say the least.
Basically, you have to create new versions of the DataGridColumnStyle
for your table, and then set the backgrounds appropriately.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hello
I search for an application that shows me how to save the datas (width, height, left, top, windowstat) from a few forms to a XML-file and restore them an apllication startup. It sould be handle for 2 monitors. So when the application was closed an monitor 2 and on the next start the monitor 2 was not available, the apllication must start up on monto 1.
Did anyone has such a class on C# for me?
Many thank
Thomas
|
|
|
|
|
Hi,
Im trying to connect ftp server over "ftp-proxy".
Here my code:
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create("ftp://ftp.xxx.com");
request.Credentials = new NetworkCredential("User", "PASS");
System.Net.WebProxy prox = new System.Net.WebProxy("111.111.111.111",21);
prox.Credentials = new NetworkCredential("USER", "PASS");
request.Proxy = prox;
request.UsePassive = true;
request.UseBinary = true;
request.UsePassive = true;
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
I get an error on the last line from my code:
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
-->The server committed a protocol violation.
Can anybody help??
Thx in advance.
|
|
|
|