|
The Char data type in .NET is not ASCII but Unicode.
You can easily convert between Char and Int32:
<br />
int i = 49;<br />
char c = (char)i;<br />
char d = (char)49;
You can also write characer codes inside a char or string literal:
char e = '\x31';<br />
char f = '\u0031';
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
There is a built in Encoder to ASCII and from ASCII. Just use System.Text.Encoding.ASCII.GetBytes and pass a string or a character array and it will provide you the ASCII byte array. The using System.Text.Encoding.ASCII.GetChars you can change back from ASCII to character. Hope it helps,
Andrei
|
|
|
|
|
Please, help me, if a component written in c# can be run on a machine which is not having .net framework installed.
Virender Singh
|
|
|
|
|
NO its not possible on any machine without .net framework.
if u want to run any .net aplication then te fremwork is must for run it
Pradeep
-- modified at 6:26 Thursday 22nd June, 2006
|
|
|
|
|
Well that's why Microsoft is cashing in with that. You need their full software suit to make something work. They should get sued for antitrust.
Donkaiser
|
|
|
|
|
my dear not full software just frame work requaired for it
Pradeep
|
|
|
|
|
I want to Create/Delet folders in server using C#.Net web developer 2005
and also getting list of files stored in the server
Thanks in Advance
|
|
|
|
|
Hi,
How can get the object from this string ?
string abc = "this.abc";
Thanks
Wilson
|
|
|
|
|
|
Would you mind give a example ?
|
|
|
|
|
I'm not able to understand your exact problem. But what I have understood from your msg is that you want the object to be made from string variable. If that is the case, I suppose boxing is the solution for you.
e.g.
object obj = (object)abc;
Pls excuse if I have misunderstood,
Krunal C
|
|
|
|
|
the problem is solved by others.
Thanks
|
|
|
|
|
I have a anchor where i set the href to a page,
in the page load method of the that redirect page i check the Page.Request.UrlReferrer .but it is null,but how can i set this href through java script so that the Page.Request.UrlReferrershould not be null.
so that i can perform something.
Bibhu Shankar Panigrahi,
Software Developer
|
|
|
|
|
Hi
I have a windows service which starts with windows and i have added a timer which restarts it after 3 minutes, to follow how it is working i have logged it completely by writing it in a certain file, it usually runs fine, but for once it stop logging and also stopped working, it appears on task manager and in services window it appears as running, last log entry in before starting the timer but after that timers tick event never called, can any one think of a reason why timer event lost.
Regards
Shajeel
|
|
|
|
|
I ran into this problem once, and never got to solve it. It has something to do with a timer being used in a windows service which is running on Windows Server 2003. What happens is that randomly, the timer events stop getting fired. I had to write my own timer then to get around this problem.
By the way, some people do report that they got the problem solved by using the System.Threading.Timer class instead of System.Timers.Timer. So if you are using System.Timers.Timer, try using System.Threading.Timer first.
|
|
|
|
|
it happened with the service only one time, and service is running for some time in many boxes. i was just wondering what went wrong there.
Regards
Shajeel
|
|
|
|
|
Hi i am trying to add some additional events to a control that inherits the listview however my problem is that the event doesnt seem to show up in the event browser.
<br />
public delegate void ItemClickEvent(object sender, ItemClickEventArgs e);<br />
<br />
public ItemClickEvent ItemClick;<br />
Here is the delegate and event i created what else is required in order for these to show up in the property grid.
|
|
|
|
|
Try
[Browsable(true)]
public ItemClickEvent ItemClick;
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
You forgot the keyword "event". Try this:
public event ItemClickEvent ItemClick;
|
|
|
|
|
Hello,
Can you please tell me how can I hide the caret of a RichTextBox control completely while my app is running?
I tried this but it didn't work:
using System.Runtime.InteropServices;<br />
<br />
public class MyCaret<br />
{<br />
<br />
[DllImport("user32.dll")]<br />
public static extern int ShowCaret(IntPtr hwnd);<br />
<br />
[DllImport("user32.dll")]<br />
public static extern int HideCaret(IntPtr hwnd);<br />
<br />
}
This:
MyCaret.HideCaret(this.Handle);
And this:
MyCaret.HideCaret(richTextBox1.Handle);
But it didn't work. Please help. Thanks.
-- modified at 21:16 Wednesday 21st June, 2006
|
|
|
|
|
I'm programming a windows forms application that retrieves information from a database, binds it to various controls(datagrids, textboxes, datetimepickers,etc.). The binding happens correctly and saving and loading work just fine.
An issue, however, has arisen in the need to catch the form before it closes to ask the user if they want to save. Just catching the event and calling the save function if the user wants to save works, but I'm looking for a way to check the data before the dialog box pops, and suppressing the box from showing if there have been no changes.
I see this as being potentially doable from one of two places:
Within my handler class, which houses the database and the appropriate saving and loading functionality, as well as exposing the tables to the other classes.
Within the BindingSource elements(there are about a dozen).
The problem is, that I don't see any event or member in each one that I can handle or check to see if the data is different from the original.
I tried using a set of foreach loops that loops through every table in the dataset, every row in the table, and checking the RowState parameter, but they remain UnModified, because I don't call EndEdit() on the bindingsources (because I don't think I should do that until I'm actually saving).
Obviously, I could handle the Changed event on each control that I bindto, and set a boolean to true anytime after binding, but that seems very overkill and it seems like there should be an easier/better/more efficent way.
|
|
|
|
|
There are AcceptChanges() function and EndEdit() function.
DataSet changes are not commited until AcceptChanges is called, so I'm assuming you can call EndEdit and check the record state of your dataset for changes BEFORE saving the data.
You shouldn't call AcceptChanges until you saved the data as it updates the state of your rows (added and edited rows become unchanged, deleted rows are removed) but you can call EndEdit anytime.
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Thanks, you helped me find my issue. All of my various usercontrols inhereted a definition for a .Save() method that would call endedit, but in one of them I set flags to mark a "last modified date" field, that was giving me false positives if I was just trying to check. EndEdit() was the end solution though. Thanks.
|
|
|
|
|
I've got a TreeView and I've got nodes. Everything works fine, except the images I try to use for the nodes come out a little weird. I was expecting to have to play with the original image size, but no matter what I do the images appear a little weird (some parts fuzzy, some parts thick, some parts a little off from original color).
The original images are bitmaps, and I'm just loading them into an imagelist for the TreeView to use.
What's wrong with this picture? Why do other people's treenode images look crisp, clear, and cool, and mine look like they got smudged a little? What am I missing?
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
I noticed that with several controls in VS 2005 (status bar for one). I've never seen it happen in 2003. I'd like to know too if somebody has an answer.
Try code model generation tools at BoneSoft.com.
|
|
|
|