|
Thanks
Now i'm remember that byte in ArrayList
This is my code:
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
Program a = new Program();<br />
<br />
byte[] actArray1 = new byte[5];<br />
byte[] actArray2 = new byte[5];<br />
byte[] cant = new byte[5];<br />
ArrayList actList = new ArrayList();<br />
<br />
actArray1[0] = 0x6f;<br />
actArray1[1] = 0x6f;<br />
actArray1[2] = 0x5f;<br />
actArray1[3] = 0x6f;<br />
actArray1[4] = 0x1f;<br />
<br />
actArray2[0] = 0x6a;<br />
actArray2[1] = 0x6f;<br />
actArray2[2] = 0x6f;<br />
actArray2[3] = 0x6a;<br />
actArray2[4] = 0x4f;<br />
<br />
cant[0] = 0x6a;<br />
cant[1] = 0x6f;<br />
cant[2] = 0x6f;<br />
cant[3] = 0x6a;<br />
cant[4] = 0x4f;<br />
<br />
actList.Add(actArray1);<br />
actList.Add(actArray2);<br />
<br />
foreach (byte[] actArray in actList)<br />
{<br />
if (a.AreEqual(actArray,cant))<br />
Console.WriteLine("same byte array");<br />
}<br />
<br />
Console.ReadLine();<br />
}<br />
private bool AreEqual(byte[] a, byte[] b)<br />
{<br />
if (a.Length != b.Length)<br />
return false;<br />
for (int i = 0; i < a.Length; i++)<br />
if (a[i] != b[i])<br />
return false;<br />
return true;<br />
}<br />
}
|
|
|
|
|
Hi all,
We are automating an excel sheet using c#.
We provided security to the excel sheet by using protect() method.
The problem is,
the excel sheet can be modified by other unauthenticated users of the system inspite of the protection we provided programatically.
We need to modify the excel sheet only programatically but not manually by opening the excel sheet and modify data in the cells.
We also tried setting the protection level attributes in the excel sheet tools
manually...But we are not satisfied as the protection level attributes can also be changed by others.
Please help us.
Regards,
IET
|
|
|
|
|
explain me secend FDemo , explain that what is it? it has the same name with class:
class FDemo {
int x;
FDemo (int i) {
x = i;
}
|
|
|
|
|
Hello,
It's a parameterised constructor;
The constructor name has to be equal with the class name!
A class can have more than one constructor:
class FDemo
{
int x;
FDemo()
{
}
FDemo(int i)
{
x = i;
}
}
If you now want to instanciate the class you could use:
FDemo fdemo = new FDemo();
or:
int actValue = 5;
FDemo fdemo = new FDemo(actValue);
All the best,
Martin
|
|
|
|
|
thanks. but why we use constructor?
|
|
|
|
|
ptvce wrote: but why we use constructor?
Like I said, to instanciate a class;
Or, do you mean, why we use parameterized constructors?
All the best,
Martin
|
|
|
|
|
I think you might want to buy a book on OOP, as this is a very fundamental question to understanding it.
Standards are great! Everybody should have one!
|
|
|
|
|
hi all
i am doing a chatting a softeware and my Qn is how can i blink the form when it receives a message ...i mean if the form is minimized, the form should blink on receiving a message..
Regards
Joemon Varghese
|
|
|
|
|
Hi,
i can't help you with a blinking form, but what do you think of a blinking notifyIcon? You would just need a timer to change the notifyIcon each second or so.
Regards
|
|
|
|
|
i need to know What is SSL Encryption means ? how to get ssl encryption in page?
sathimailin
|
|
|
|
|
sathimailin1 wrote: What is SSL Encryption means
SSL is Secure Socket Layer, an encryption mechanism used to send information securely on internet. Basically it holds a public key and a private key.
sathimailin1 wrote: how to get ssl encryption in page?
You have to install SSL on IIS. And browse your site through HTTPS protocol. If your web applications really needs to send sensitive information like Credit card numbers, you could use SSL. But it always requires more processing overhead and financial overhead.
|
|
|
|
|
Thanks a lot for ur reply and from where i ll get the SSL to install and how to install it on IIS. can u please make me clear.
sathimailin1
|
|
|
|
|
|
Really good one u linked me and thanks
i voted you 4
sathimailin1
|
|
|
|
|
|
Thanks a lot for ur reply and from where i ll get the SSL to install and how to install it on IIS. can u please make me clear.
sathimailin1
|
|
|
|
|
hi friends,
how does a select statement in stored procedure makes difference from a select statement in class.
what are the gain in doing it..
ganesh
|
|
|
|
|
Stored procedure is pre-compiled but the class query coding needs to get compiled in run time
sathimailin1
|
|
|
|
|
For each SQL Command the DBMS will do syntax check and execution plan generation.
For class queries DBMS will do it for each time the query executed, for stored procedures, at the first execution DBMS will do the syntax check and will store the execution plan. So it executing a Stored Procedure is efficient than usual queries.
Regards!
|
|
|
|
|
Hi,
I am going to develop a Windows Service in C#. It will be triggering for every 24hours and I want to invoke it On Demand As well.
Can I invoke a windows service on demand????
Thanks & Regards !!!
jayasshc
|
|
|
|
|
|
Thanks a lot
|
|
|
|
|
Hi,
Can't I invoke its method without stoping and starting?
jayasshc
|
|
|
|
|
Hi
This is Murthy. Anybody has a C# Code
to generate 12 digit Unique Promotion Codes/Coupon Numbers.
Those numbers should not be generated in sequence like 10234, 10235, 10236 etc...
All the numbers should be generated in random and should not be duplicated.
Example:
1. Promotion Codes for Product Discounts.
2. Prepaid Recharge Coupons for Mobile Phones etc.
Thanks
Murthy.
|
|
|
|
|
Most likely what you want is for the last digit to be a checksum, so you can verify the codes are genuine. If you need to generate a random sequence, your best bet is to create an int list, and use a random generator to pull numbers out of it at random positions.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|