|
The character code for the copyright symbol is 169 (hex A9), so the code works exactly as expected.
What you have done in PHP is not at all the same as what you have done in C#. The byte sequence C2 A9 is not a character code, it's the utf-8 encoding of a string containing the copyright symbol.
To encode a string, use the GetBytes method of the appropriate Encoding instance:
string text = "\xA9";
byte[] data = System.Text.Encoding.UTF8.GetBytes(text);
Now you have an array with the length 2, and the contents { 194, 169 } (hex C2 A9).
---
single minded; short sighted; long gone;
|
|
|
|
|
Trustapple, you really really need to pick up a basic programming book and work your way through it. Granted your questions are getting slightly more complex but seriously - you're still asking similar questions about "functions" that you've been asking for the last day or so!
Trustapple wrote: wen do we create a an object and call the function and wen we can call the function without creating a object.
Put simply, a static method can be called without creating an instance of the object, and an instance method (as is suggested by it's name) must be called on an instance of an object.
|
|
|
|
|
I need a way to get All the records or domains in a NameServer ..
I've red an artice here of C# .NET DNS query component
but it gets all the records for Specific Domain Only ..
Again I need All the Domains or Entrys in this NS
Is that Possible in C#??
Is that Possible using Zone Files??
Is that Possible NsLookUp.exe??
|
|
|
|
|
I'm hesitating to say anything because this can be used for very malicious purposes. What I WILL say is that this is probably not going to be possible on the DNS server you're querying because the server configuration may not let you make such a request. Like I said, ... malicious purposes.
|
|
|
|
|
you're right .. but still there is websites that provide such services
for example "www.domainsdb.net" given the NS it will provide a list of domains contained but the search is limited to 500 results ONLY ..
is it possible to do something like that ??
|
|
|
|
|
Since you don't have direct access to the DNS server, no there isn't. This is because you can give the top level domain as a query and get millions of results. This would bring both the DNS and web server to it's knees processing that many results.
Without direct access to a DNS server that isn't restricted, there's simply nothing you can do unless you get your own DNS server onto the web and can replicate the database of another server.
A query like that is too dangerous to run from an untrusted source. So about the only possible way I can see this happening is if you get your own private copy of a DSN server. Good luck getting that...
|
|
|
|
|
Thanks Dave for ur co-operation ...
but I still have one more question ..
if I have Zone Files actually "I Have it".. can I extract the information i need from it given DNS ??
if yes then how can I Do that ??
Thanks Again ..
|
|
|
|
|
I said this before - I can't tell you. If someone else wants to, that's their responsiblity.
And if you have the zone files for a real world internet DNS server, I don't want to know about it.
|
|
|
|
|
*giggle*
so glad you were 8 minutes faster than me
|
|
|
|
|
Davids Maguire wrote: I need a way to get All the records or domains in a NameServer
From what/where? How do you identify it as a NameServer?
|
|
|
|
|
led mike wrote: From what/where?
do not understand what do u mean ??
led mike wrote: How do you identify it as a NameServer?
it is not a big deal to identify a NameServer ... querying any Whois Server with a range of ips can give u the required NSs there ..
Thanks 4 ur co-operation
|
|
|
|
|
I see you and Dave are discussing this so I will let you guys have at it.
|
|
|
|
|
hi, im new in C#, kindly help me. i want to make a console program using C#.Net 2005 to read a notepad file saved in my drive. the notepad file contains 3 columns i.e. CustNo, X, and Y columns. These columns have many values i mean i dunno how many rows will be there in that notepad file. The rows may be 100, 1000 or 5000 which depends on the file means the rows are not constant.
I want to know the code of it, also tell me what to use. will it b better to use a single array for a single colums or a linked list? or anything else?
CustNo. X Y
0 10 25
1 25 36
2 52 21
3 21 58
4 87 54
5 61 71
6 .. ..
7 .. ..
. .. ..
. .. ..
. .. ..
Kindly help me in this regard. Thanx
nOmI
|
|
|
|
|
nomi khan wrote: I want to know the code of it
Read the first post titled: "How to get an answer to your question". Pay attention to item #2.
|
|
|
|
|
all i can say is sorry
nOmI
|
|
|
|
|
You can do a File.ReadAllLines and put all lines of the file into an array. Later, you can loop through the array and parse each line to seperate the CustNo, X and Y values into a different array (for example a three-dimensional one, or a one-dimensional one with a struct that contains these three fields).
This will however take a lot of memory on larger files, so it might be better to do a while((line = file.ReadLine()) != null) and do the string processing there to save memory.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
I am new to writing windows services with c#. I wrote a windows service that writes to the event log using this code
EventLog.WriteEntry(ServiceName + " Service started");
Whenever my service starts it stops stating that it failed due to not having permissions to write to the event log.
How can I make sure my windows service has the proper permissions to write the Event Log?
Thanks,
Greg
|
|
|
|
|
|
Well I don't see anything in there that explains why this code works with no problems on my windows vista, windows xp, and windows 2000 machines when run with administrator priviledges, but not on my windows server 2003 box with admin privilges. I guess they left that part out. :\
|
|
|
|
|
Greg Ellis wrote: I guess they left that part out.
Maybe you write their documentation since you left all that out of your first post. *sigh*
See if this helps:
http://support.microsoft.com/kb/323076[^]
|
|
|
|
|
Hi all,
Plz some one suggest me/ give some sample links, how to convert an hexadecimal to string.
For eg: I want to convert the below hexa decimal value into string
01040209000D0006040705000D0008020208000D0006010204
thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
Exelioindia wrote: I want to convert the below hexa decimal value into string
.ToString(formatSpecifier)
|
|
|
|
|
For goodness sake. You posted this question in another way just a couple of posts below. Please have the courtesy of responding on that thread and not starting a new one off just because you can't be bothered to think about the replies.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi all,
I have following problem. I have folloving classes
public class MyBase
{
public propA {get {return ...}}
...
}
public class MyExt: MyBase
{
public propB {get {return ...}}
...
}
than I have a list
public class listClass: List<mybase>
{
...
}
This list can be populated with MyBase or MyExt objects. What I want to do is setup databinding to DataGridView to see propB (if available).
Is it possible?
Thanks
Petr
|
|
|
|