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

Search:

Type: Posts; User: Reroto

Search: Search took 0.05 seconds.

  1. Re: How to create multiple anonymous methods in loop.

    Yeah, that's for find the index of the button clicked, anyway i have done a better way without using a part of the text


    results[this.Controls.OfType<Button>().ToList().IndexOf((sender as...
  2. Re: How to create multiple anonymous methods in loop.

    A bit long but works


    options[x].Click += delegate(object sender, EventArgs e) { results[int.Parse(this.Controls.OfType<Button>().Where(s => s.Text == (sender as...
  3. Re: load/encrypt large files error memory out of exception

    Ok send or post it i'll try to help you
  4. Re: load/encrypt large files error memory out of exception

    Convert the secure function to encrypt a list of byte[] instead of only one array and i can help you in code

    (ps: the max value of a byte array is the Int32.MaxValue)
  5. Thread: C# HashSet

    by Reroto
    Replies
    1
    Views
    882

    Re: C# HashSet

    More info? Anyway... list.Distinct()
  6. Replies
    1
    Views
    3,051

    Re: From UTF8 sting to byte array and vice versa

    Probably the first array was of a different encoding, try using ASCII or Default
  7. Re: Finding Lowest Value Of Every Column In A 2d Array

    Ultimate edition xD


    public static void Main()
    {
    int[,] lol = new int[3, 7]{
    {1, 2, 3, 4, 5, 6, 7},
    {8, 9, 10, 9, 8, 7, 11},
    ...
  8. Re: Finding Lowest Value Of Every Column In A 2d Array

    That's it


    static int[] Min2d(int[,] a)
    {
    int rows = a.GetLength(0);
    int columns = a.GetLength(1);
    int[] min = new int[columns];

    for...
  9. Re: Finding Lowest Value Of Every Column In A 2d Array

    Why? It's not c++, it's c#, an advanced object-oriented language.

    Anyway...


    static int[] Min2d(int[,] a)
    {
    int[] min = new int[a.GetLength(0)];
    for (int i =...
  10. Re: Finding Lowest Value Of Every Column In A 2d Array

    //.....

    int[,] lol = new int[3, 7]{
    {1, 2, 3, 4, 5, 6, 7},
    {8, 9, 10, 9, 8, 7, 11},
    {5, 4, 4, 2, 1, 0, 6}};

    int[] min = Min2d(lol);

    ...
  11. Replies
    2
    Views
    1,645

    Re: A little array issue

    public struct Tile
    {
    private const int MAXLAYERS = 4;
    private const int MAXDATA = 5;
    private int tileAttribute;
    private int[] tileLayer;
    ...
  12. Re: Issues with TaskFactory items not waiting for parent to complete MCP coursework

    Maybe i have a better solution



    public static int test(int thisval)
    {
    Thread.Sleep(1000 * thisval);
    return thisval;
    }
  13. Replies
    2
    Views
    861

    Re: Referencing controls in list

    Try in this way


    foreach (ErrorButton er in this.Controls.OfType<ErrorButton>())
    {
    er.Reset();
    }
  14. Re: Marshal C struct containing pointer to other C struct

    Can you explain better(with c# examples) how you would like to use them?

    Anyway for the second struct this work?


    [StructLayout(LayoutKind.Sequential)]
    public struct IMGSTRUCT
    ...
  15. Replies
    2
    Views
    5,062

    Re: Colored background dropdownlist in combobox

    This works fine for me


    void comboBox1_DrawItem(object sender, DrawItemEventArgs e)
    {
    if (e.Index < 0) return;

    if...
  16. Re: Using a char as the control variable in a loop.

    Try this


    do
    {
    Console.Write("Enter a lower case letter: ");
    c = Console.ReadLine().ToCharArray()[0];
    if (Char.IsLower(c) &&...
Results 1 to 16 of 16





Click Here to Expand Forum to Full Width

Featured