Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: enfekted

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: Logic error in my program , object print the same values..

    It is because you are creating a new Random object for each instance. If you change it to the following, then it will create different objects.

    private static Random rnd = new Random()

    The...
  2. Replies
    2
    Views
    325

    Re: Convert ascii to hex

    Not sure I understand what you'd like to do. It sounds like you want to take the string "A" and convert it to the string "41". Is that correct?

    If so, then there are a couple of steps:
    1. convert...
  3. Replies
    1
    Views
    272

    Re: Question on debug error

    To make answering this simpler, a debugger should be able to tell you exactly what line the exception occurred at. Most debuggers can even break on exception allowing for you to take a look at the...
  4. Thread: Game launcher

    by enfekted
    Replies
    3
    Views
    748

    Re: Game launcher

    Not sure I understand what you mean by this. Could you clarify? (maybe give an example?)
  5. Replies
    1
    Views
    308

    Re: Need help with Enum and Struct

    If you really, really want you can use static classes, however this is very hard-coded and doesn't lend itself much to extensibility or real usage outside of making your code easier to read.


    ...
  6. Replies
    2
    Views
    593

    Re: Need help with stacked Attributes

    My first thought is if the 2nd parameter is directly related to the 1st, then why is the first parameter of the ctor even needed?

    You might want to consider having the model depend on the Company...
  7. Replies
    6
    Views
    1,189

    Re: Byte and byte array conversions

    According to here the Convert.ToByte only works on values 0-9. It doesn't look like it supports hex.

    I assume the following should work...

    hex = decValue.ToString();

    Or if you must use hex,...
  8. Re: How to return keyboard focus to topmost form?

    Sounds like you have a Modeless dialog, when what you really want is a Modal dialog. Could you pop up the child window using "ShowDialog" instead of "Show"?

    See here for more info.
    This will...
  9. Replies
    6
    Views
    1,189

    Re: Byte and byte array conversions

    I don't believe there's any way to automatically add the "0x" to the beginning. You'll have to do this yourself.


    hex = string.Format("0x{0:X}", decValue);

    Would this work?
  10. Re: How to check if a url is valid from a windows application

    The main problem with using a RegEx is that Uri formats change over time. For example, everyone 10 years ago thought that IPv4 was plenty & now we have IPv6 (a very different syntax). Eventually,...
  11. Re: How to check if a url is valid from a windows application

    Why not use the System.Uri class?
  12. Replies
    2
    Views
    522

    Re: Enum.Parse question

    Take a look at Enum.IsDefined. I think this is what you're looking for.
  13. Re: How to copy only new files from folder A to B(AppendConstrainLine, FileInfo.Exist

    Your going to have to do some manipulation of the file paths.

    Step 1: Get a listing of all your files in your source directory
    Step 2: Combine the source filename w/ the destination directory...
  14. Thread: process icon

    by enfekted
    Replies
    1
    Views
    2,206

    Re: process icon

    1. You can get a list of the processes by using Process.GetProcesses()
    2. Then you can get the associated icon using Icon.ExtractAssociatedIcon()

    hth
  15. Re: Type.ToString() returns something unexpected...

    errr... yeah :)
  16. Re: Type.ToString() returns something unexpected...

    Good thinking looking at the IL.

    I'm guessing... this is just one of those subtle differences between C++ and C# that isn't apparent...

    In C++, an int[2][3] is an array of 3 int[2] items
    In...
  17. Type.ToString() returns something unexpected...

    Evidentally:


    typeof(int[][,]).ToString() == "int[,][]"


    I'd expect typeof(int[][,]).ToString() == "int[][,]", however it actually returns "int[,][]".

    Does anyone have any guesses as to...
  18. Replies
    8
    Views
    1,579

    Re: Friend Assembly Overuse?

    The surface area should be the same in either case (internal methods, although somewhat hidden, aren't any more secure than public methods).

    I agree that CAS shouldn't be overlooked in either...
  19. Replies
    8
    Views
    1,579

    Re: Friend Assembly Overuse?

    Thanks for the replies.



    I'm referring to using the InternalsVisibleToAttribute in .NET. How does this reduces security?
  20. Replies
    2
    Views
    1,479

    Re: Please suggest.........

    You could also look into Team Foundation Server included with Visual Studio Team System 2008.
  21. Replies
    8
    Views
    1,579

    Re: Friend Assembly Overuse?

    Thanks Darwen, you make a good point. I remember now that backward compatibility was another argument given for making all the methods internal, but I agree it doesn't make much sense to ever have...
  22. Replies
    4
    Views
    707

    Re: Where have I clicked?

    Modifying from Danny's idea... would this work?



    private void listView1_MouseClick(object sender, MouseEventArgs e) {
    if (listView1.SelectedItems.Count == 1) {


    ...
  23. Re: Problem with a multiline textbox

    How do you mean badly formatted? Your code should show the entire contents of the response including all the "<html><head><strong>etc".

    If this is not what you want, then you may be looking...
  24. Thread: Reportviewer

    by enfekted
    Replies
    2
    Views
    7,120

    Re: Reportviewer

    A couple of things I noticed...

    #1. First your DataCol needs to be a Collection to be used as a list in the Object Data Source...

    #2. Need to create a System.Windows.Forms.BindingSource to...
  25. Replies
    8
    Views
    1,579

    Friend Assembly Overuse?

    At my company we ship a product that includes around 30 .NET assemblies that we have developed. We have a couple of developers that are under the impression that any public class/method in these...
Results 1 to 25 of 138
Page 1 of 6 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center