Is there a way I can return more than one integer from a method? [duplicate]How can I return multiple values from a function in C#?Returning two lists in C#Hidden Features of C#?Randomize a List<T>Best way to repeat a character in C#Proper use of the IDisposable interfaceDoes C# have extension properties?Get int value from enum in C#How do I remedy the “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?Group by in LINQIs there a reason for C#'s reuse of the variable in a foreach?d is less efficient than [0-9]

Is there a way to make member function NOT callable from constructor?

Is "plugging out" electronic devices an American expression?

How can I add custom success page

Extreme, but not acceptable situation and I can't start the work tomorrow morning

COUNT(*) or MAX(id) - which is faster?

What happens when a metallic dragon and a chromatic dragon mate?

Is ipsum/ipsa/ipse a third person pronoun, or can it serve other functions?

Re-submission of rejected manuscript without informing co-authors

Can the Produce Flame cantrip be used to grapple, or as an unarmed strike, in the right circumstances?

Why do we use polarized capacitors?

Does the average primeness of natural numbers tend to zero?

What is the meaning of "of trouble" in the following sentence?

Where else does the Shulchan Aruch quote an authority by name?

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Is every set a filtered colimit of finite sets?

Pristine Bit Checking

extract characters between two commas?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Piano - What is the notation for a double stop where both notes in the double stop are different lengths?

Is there a name of the flying bionic bird?

Does it makes sense to buy a new cycle to learn riding?

What does "enim et" mean?

What to wear for invited talk in Canada



Is there a way I can return more than one integer from a method? [duplicate]


How can I return multiple values from a function in C#?Returning two lists in C#Hidden Features of C#?Randomize a List<T>Best way to repeat a character in C#Proper use of the IDisposable interfaceDoes C# have extension properties?Get int value from enum in C#How do I remedy the “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?Group by in LINQIs there a reason for C#'s reuse of the variable in a foreach?d is less efficient than [0-9]






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








18
















This question already has an answer here:



  • How can I return multiple values from a function in C#?

    26 answers



I have a method like this:



private double GetHeight()

return 2;



But I would like to be able to return two different numbers for example 2 and 3. Is there any way that I can do this in C#?










share|improve this question















marked as duplicate by Mormegil, Soner Gönül c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
13 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • return array if you need more values

    – Shubham
    16 hours ago






  • 1





    This probably is exactly what you need

    – Jordi
    16 hours ago






  • 2





    for clarity: does your method always return the same number of return values (each with specific semantic meaning) - or is the number of return values dynamic, i.e. sometimes it'll be 1 (or maybe even zero), and other times it might be 20? It matters a lot. For the fixed number scenario: any of the tuple-ish answers are good; for the dynamic scenario: the array/list approaches are good.

    – Marc Gravell
    16 hours ago












  • How does this question have so many upvotes? The question lacks a significant amount of effort and a simple search on the internet would've provided the answer stackoverflow.com/help/how-to-ask

    – Denny
    12 hours ago


















18
















This question already has an answer here:



  • How can I return multiple values from a function in C#?

    26 answers



I have a method like this:



private double GetHeight()

return 2;



But I would like to be able to return two different numbers for example 2 and 3. Is there any way that I can do this in C#?










share|improve this question















marked as duplicate by Mormegil, Soner Gönül c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
13 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • return array if you need more values

    – Shubham
    16 hours ago






  • 1





    This probably is exactly what you need

    – Jordi
    16 hours ago






  • 2





    for clarity: does your method always return the same number of return values (each with specific semantic meaning) - or is the number of return values dynamic, i.e. sometimes it'll be 1 (or maybe even zero), and other times it might be 20? It matters a lot. For the fixed number scenario: any of the tuple-ish answers are good; for the dynamic scenario: the array/list approaches are good.

    – Marc Gravell
    16 hours ago












  • How does this question have so many upvotes? The question lacks a significant amount of effort and a simple search on the internet would've provided the answer stackoverflow.com/help/how-to-ask

    – Denny
    12 hours ago














18












18








18









This question already has an answer here:



  • How can I return multiple values from a function in C#?

    26 answers



I have a method like this:



private double GetHeight()

return 2;



But I would like to be able to return two different numbers for example 2 and 3. Is there any way that I can do this in C#?










share|improve this question

















This question already has an answer here:



  • How can I return multiple values from a function in C#?

    26 answers



I have a method like this:



private double GetHeight()

return 2;



But I would like to be able to return two different numbers for example 2 and 3. Is there any way that I can do this in C#?





This question already has an answer here:



  • How can I return multiple values from a function in C#?

    26 answers







c#






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 16 hours ago









Michał Turczyn

16.2k132241




16.2k132241










asked 16 hours ago









Alan2Alan2

1,71856139278




1,71856139278




marked as duplicate by Mormegil, Soner Gönül c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
13 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Mormegil, Soner Gönül c#
Users with the  c# badge can single-handedly close c# questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
13 hours ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • return array if you need more values

    – Shubham
    16 hours ago






  • 1





    This probably is exactly what you need

    – Jordi
    16 hours ago






  • 2





    for clarity: does your method always return the same number of return values (each with specific semantic meaning) - or is the number of return values dynamic, i.e. sometimes it'll be 1 (or maybe even zero), and other times it might be 20? It matters a lot. For the fixed number scenario: any of the tuple-ish answers are good; for the dynamic scenario: the array/list approaches are good.

    – Marc Gravell
    16 hours ago












  • How does this question have so many upvotes? The question lacks a significant amount of effort and a simple search on the internet would've provided the answer stackoverflow.com/help/how-to-ask

    – Denny
    12 hours ago


















  • return array if you need more values

    – Shubham
    16 hours ago






  • 1





    This probably is exactly what you need

    – Jordi
    16 hours ago






  • 2





    for clarity: does your method always return the same number of return values (each with specific semantic meaning) - or is the number of return values dynamic, i.e. sometimes it'll be 1 (or maybe even zero), and other times it might be 20? It matters a lot. For the fixed number scenario: any of the tuple-ish answers are good; for the dynamic scenario: the array/list approaches are good.

    – Marc Gravell
    16 hours ago












  • How does this question have so many upvotes? The question lacks a significant amount of effort and a simple search on the internet would've provided the answer stackoverflow.com/help/how-to-ask

    – Denny
    12 hours ago

















return array if you need more values

– Shubham
16 hours ago





return array if you need more values

– Shubham
16 hours ago




1




1





This probably is exactly what you need

– Jordi
16 hours ago





This probably is exactly what you need

– Jordi
16 hours ago




2




2





for clarity: does your method always return the same number of return values (each with specific semantic meaning) - or is the number of return values dynamic, i.e. sometimes it'll be 1 (or maybe even zero), and other times it might be 20? It matters a lot. For the fixed number scenario: any of the tuple-ish answers are good; for the dynamic scenario: the array/list approaches are good.

– Marc Gravell
16 hours ago






for clarity: does your method always return the same number of return values (each with specific semantic meaning) - or is the number of return values dynamic, i.e. sometimes it'll be 1 (or maybe even zero), and other times it might be 20? It matters a lot. For the fixed number scenario: any of the tuple-ish answers are good; for the dynamic scenario: the array/list approaches are good.

– Marc Gravell
16 hours ago














How does this question have so many upvotes? The question lacks a significant amount of effort and a simple search on the internet would've provided the answer stackoverflow.com/help/how-to-ask

– Denny
12 hours ago






How does this question have so many upvotes? The question lacks a significant amount of effort and a simple search on the internet would've provided the answer stackoverflow.com/help/how-to-ask

– Denny
12 hours ago













5 Answers
5






active

oldest

votes


















23














Yes ValueTuple / Named Tuple (available in C# 7.1). The advantage is its the most succinct, its immutable, and its easy to construct.




The ValueTuple struct has fields named Item1, Item2, Item3, and so on,
similar to the properties defined in the existing Tuple types.



However, when you initialize a tuple, you can use new language
features that give better names to each field. Doing so creates a
named tuple. Named tuples still have elements named Item1, Item2,
Item3 and so on. But they also have synonyms for any of those elements
that you have named. You create a named tuple by specifying the names
for each element.




private (double first, double second) GetHeight()

return (1,2);


...

var result = ViaNamedValueTuple();
Console.WriteLine($"result.first, result.second");

var (first, second) = ViaNamedValueTuple();
Console.WriteLine($"first, second");


Classic Tuple



C# tuple type




The .NET Framework already has generic Tuple classes. These classes,
however, had two major limitations. For one, the Tuple classes named
their properties Item1, Item2, and so on. Those names carry no
semantic information. Using these Tuple types does not enable
communicating the meaning of each of the properties. The new language
features enable you to declare and use semantically meaningful names
for the elements in a tuple.




public Tuple<int, int> ViaClassicTuple()

return new Tuple<int, int>(1,2);


...

var tuple = ViaClassicTuple();
Console.WriteLine($"tuple.Item1, tuple.Item2");


Classic struct



struct (C# Reference)




A struct type is a value type that is typically used to encapsulate
small groups of related variables, such as the coordinates of a
rectangle or the characteristics of an item in an inventory.




public struct ClassicStruct

public int First get; set;
public int Second get; set;
public ClassicStruct(int first, int second)

First = first;
Second = second;



...

public ClassicStruct ViaClassicStruct()

return new ClassicStruct(1, 2);


...

var classicStruct = ViaClassicStruct();
Console.WriteLine($"classicStruct.First, classicStruct.Second");


Readonly struct



readonly (C# Reference)




The readonly modifier on a struct definition declares that the struct
is immutable. Every instance field of the struct must be marked
readonly, as shown in the following example:




public readonly struct ReadonlyStruct

public int First get;
public int Second get;
public ReadonlyStruct(int first, int second)

First = first;
Second = second;



...

public ReadonlyStruct ViaReadonlyStruct()

return new ReadonlyStruct(1, 2);


...


var readonlyStruct = ViaReadonlyStruct();
Console.WriteLine($"readonlyStruct.First, readonlyStruct.Second");


Simple Class



Classes (C# Programming Guide)




A type that is defined as a class is a reference type. At run time,
when you declare a variable of a reference type, the variable contains
the value null until you explicitly create an instance of the class by
using the new operator, or assign it an object of a compatible type
that may have been created elsewhere




public class SomeClass

public int First get; set;
public int Second get; set;
public SomeClass(int first, int second)

First = first;
Second = second;



...

public SomeClass ViaSomeClass()

return new SomeClass(1, 2);


...


var someClass = ViaSomeClass();
Console.WriteLine($"someClass.First, someClass.Second");


Out parameters



out parameter modifier (C# Reference)




The out keyword causes arguments to be passed by reference. It makes
the formal parameter an alias for the argument, which must be a
variable. In other words, any operation on the parameter is made on
the argument. It is like the ref keyword, except that ref requires
that the variable be initialized before it is passed. It is also like
the in keyword, except that in does not allow the called method to
modify the argument value. To use an out parameter, both the method
definition and the calling method must explicitly use the out keyword.




public bool ViaOutParams(out int first, out int second)

first = 1;
second = 2;
return someCondition;


...

if(ViaOutParams(out var firstInt, out var secondInt))
Console.WriteLine($"firstInt, secondInt");


Out Value Tuple



public bool ViaOutTuple(out (int first,int second) output)

output = (1, 2);
return someCondition;


...

if (ViaOutTuple(out var output))
Console.WriteLine($"output.first, output.second");





share|improve this answer

























  • Note: Available in C# 7.0 +.

    – Adriani6
    16 hours ago


















19














Multiple ways:




  1. out parameters:



    private double GetHeight(out int anotherValue)

    anotherValue = 42;
    return 2;




  2. value-tuples:



    private (double height, int anotherValue) GetHeight()

    return (42, 2);



    (warning: value-tuples have known problems if used in .NET Standard libraries, as the assembly bindings from .NET Standard to .NET Framework are ... kinda fubar)




  3. custom return types:



    private Something GetHeight()

    return new Something(42, 2);



    (to avoid allocations, you may wish to define Something as a readonly struct in this scenario)







share|improve this answer
































    3














    Yes, you can use Tuple:



    class Program

    static void Main(string[] args)

    Tuple<int, int> height = GetHeight();

    Console.WriteLine(height.Item1 + " - " + height.Item2);
    Console.ReadLine();


    private static Tuple<int, int> GetHeight()

    return new Tuple<int, int>(2, 3);




    OUTPUT:



    2 - 3






    share|improve this answer






























      2














      Also you could use out parameters:



      static void Main(string[] args)

      int i, j;
      GetHeight(out i, out j);


      public static void GetHeight(out int i1, out int i2)

      i1 = 1;
      i2 = 2;






      share|improve this answer






























        0














        Make a int array.Or another way is to create class.






        share|improve this answer

























        • an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

          – Marc Gravell
          16 hours ago












        • Its not bad but its not needed in current question.

          – Vuk Uskokovic
          16 hours ago











        • I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

          – Jonesopolis
          16 hours ago











        • You can make a list too.

          – Vuk Uskokovic
          16 hours ago











        • @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

          – Marc Gravell
          16 hours ago


















        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        23














        Yes ValueTuple / Named Tuple (available in C# 7.1). The advantage is its the most succinct, its immutable, and its easy to construct.




        The ValueTuple struct has fields named Item1, Item2, Item3, and so on,
        similar to the properties defined in the existing Tuple types.



        However, when you initialize a tuple, you can use new language
        features that give better names to each field. Doing so creates a
        named tuple. Named tuples still have elements named Item1, Item2,
        Item3 and so on. But they also have synonyms for any of those elements
        that you have named. You create a named tuple by specifying the names
        for each element.




        private (double first, double second) GetHeight()

        return (1,2);


        ...

        var result = ViaNamedValueTuple();
        Console.WriteLine($"result.first, result.second");

        var (first, second) = ViaNamedValueTuple();
        Console.WriteLine($"first, second");


        Classic Tuple



        C# tuple type




        The .NET Framework already has generic Tuple classes. These classes,
        however, had two major limitations. For one, the Tuple classes named
        their properties Item1, Item2, and so on. Those names carry no
        semantic information. Using these Tuple types does not enable
        communicating the meaning of each of the properties. The new language
        features enable you to declare and use semantically meaningful names
        for the elements in a tuple.




        public Tuple<int, int> ViaClassicTuple()

        return new Tuple<int, int>(1,2);


        ...

        var tuple = ViaClassicTuple();
        Console.WriteLine($"tuple.Item1, tuple.Item2");


        Classic struct



        struct (C# Reference)




        A struct type is a value type that is typically used to encapsulate
        small groups of related variables, such as the coordinates of a
        rectangle or the characteristics of an item in an inventory.




        public struct ClassicStruct

        public int First get; set;
        public int Second get; set;
        public ClassicStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ClassicStruct ViaClassicStruct()

        return new ClassicStruct(1, 2);


        ...

        var classicStruct = ViaClassicStruct();
        Console.WriteLine($"classicStruct.First, classicStruct.Second");


        Readonly struct



        readonly (C# Reference)




        The readonly modifier on a struct definition declares that the struct
        is immutable. Every instance field of the struct must be marked
        readonly, as shown in the following example:




        public readonly struct ReadonlyStruct

        public int First get;
        public int Second get;
        public ReadonlyStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ReadonlyStruct ViaReadonlyStruct()

        return new ReadonlyStruct(1, 2);


        ...


        var readonlyStruct = ViaReadonlyStruct();
        Console.WriteLine($"readonlyStruct.First, readonlyStruct.Second");


        Simple Class



        Classes (C# Programming Guide)




        A type that is defined as a class is a reference type. At run time,
        when you declare a variable of a reference type, the variable contains
        the value null until you explicitly create an instance of the class by
        using the new operator, or assign it an object of a compatible type
        that may have been created elsewhere




        public class SomeClass

        public int First get; set;
        public int Second get; set;
        public SomeClass(int first, int second)

        First = first;
        Second = second;



        ...

        public SomeClass ViaSomeClass()

        return new SomeClass(1, 2);


        ...


        var someClass = ViaSomeClass();
        Console.WriteLine($"someClass.First, someClass.Second");


        Out parameters



        out parameter modifier (C# Reference)




        The out keyword causes arguments to be passed by reference. It makes
        the formal parameter an alias for the argument, which must be a
        variable. In other words, any operation on the parameter is made on
        the argument. It is like the ref keyword, except that ref requires
        that the variable be initialized before it is passed. It is also like
        the in keyword, except that in does not allow the called method to
        modify the argument value. To use an out parameter, both the method
        definition and the calling method must explicitly use the out keyword.




        public bool ViaOutParams(out int first, out int second)

        first = 1;
        second = 2;
        return someCondition;


        ...

        if(ViaOutParams(out var firstInt, out var secondInt))
        Console.WriteLine($"firstInt, secondInt");


        Out Value Tuple



        public bool ViaOutTuple(out (int first,int second) output)

        output = (1, 2);
        return someCondition;


        ...

        if (ViaOutTuple(out var output))
        Console.WriteLine($"output.first, output.second");





        share|improve this answer

























        • Note: Available in C# 7.0 +.

          – Adriani6
          16 hours ago















        23














        Yes ValueTuple / Named Tuple (available in C# 7.1). The advantage is its the most succinct, its immutable, and its easy to construct.




        The ValueTuple struct has fields named Item1, Item2, Item3, and so on,
        similar to the properties defined in the existing Tuple types.



        However, when you initialize a tuple, you can use new language
        features that give better names to each field. Doing so creates a
        named tuple. Named tuples still have elements named Item1, Item2,
        Item3 and so on. But they also have synonyms for any of those elements
        that you have named. You create a named tuple by specifying the names
        for each element.




        private (double first, double second) GetHeight()

        return (1,2);


        ...

        var result = ViaNamedValueTuple();
        Console.WriteLine($"result.first, result.second");

        var (first, second) = ViaNamedValueTuple();
        Console.WriteLine($"first, second");


        Classic Tuple



        C# tuple type




        The .NET Framework already has generic Tuple classes. These classes,
        however, had two major limitations. For one, the Tuple classes named
        their properties Item1, Item2, and so on. Those names carry no
        semantic information. Using these Tuple types does not enable
        communicating the meaning of each of the properties. The new language
        features enable you to declare and use semantically meaningful names
        for the elements in a tuple.




        public Tuple<int, int> ViaClassicTuple()

        return new Tuple<int, int>(1,2);


        ...

        var tuple = ViaClassicTuple();
        Console.WriteLine($"tuple.Item1, tuple.Item2");


        Classic struct



        struct (C# Reference)




        A struct type is a value type that is typically used to encapsulate
        small groups of related variables, such as the coordinates of a
        rectangle or the characteristics of an item in an inventory.




        public struct ClassicStruct

        public int First get; set;
        public int Second get; set;
        public ClassicStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ClassicStruct ViaClassicStruct()

        return new ClassicStruct(1, 2);


        ...

        var classicStruct = ViaClassicStruct();
        Console.WriteLine($"classicStruct.First, classicStruct.Second");


        Readonly struct



        readonly (C# Reference)




        The readonly modifier on a struct definition declares that the struct
        is immutable. Every instance field of the struct must be marked
        readonly, as shown in the following example:




        public readonly struct ReadonlyStruct

        public int First get;
        public int Second get;
        public ReadonlyStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ReadonlyStruct ViaReadonlyStruct()

        return new ReadonlyStruct(1, 2);


        ...


        var readonlyStruct = ViaReadonlyStruct();
        Console.WriteLine($"readonlyStruct.First, readonlyStruct.Second");


        Simple Class



        Classes (C# Programming Guide)




        A type that is defined as a class is a reference type. At run time,
        when you declare a variable of a reference type, the variable contains
        the value null until you explicitly create an instance of the class by
        using the new operator, or assign it an object of a compatible type
        that may have been created elsewhere




        public class SomeClass

        public int First get; set;
        public int Second get; set;
        public SomeClass(int first, int second)

        First = first;
        Second = second;



        ...

        public SomeClass ViaSomeClass()

        return new SomeClass(1, 2);


        ...


        var someClass = ViaSomeClass();
        Console.WriteLine($"someClass.First, someClass.Second");


        Out parameters



        out parameter modifier (C# Reference)




        The out keyword causes arguments to be passed by reference. It makes
        the formal parameter an alias for the argument, which must be a
        variable. In other words, any operation on the parameter is made on
        the argument. It is like the ref keyword, except that ref requires
        that the variable be initialized before it is passed. It is also like
        the in keyword, except that in does not allow the called method to
        modify the argument value. To use an out parameter, both the method
        definition and the calling method must explicitly use the out keyword.




        public bool ViaOutParams(out int first, out int second)

        first = 1;
        second = 2;
        return someCondition;


        ...

        if(ViaOutParams(out var firstInt, out var secondInt))
        Console.WriteLine($"firstInt, secondInt");


        Out Value Tuple



        public bool ViaOutTuple(out (int first,int second) output)

        output = (1, 2);
        return someCondition;


        ...

        if (ViaOutTuple(out var output))
        Console.WriteLine($"output.first, output.second");





        share|improve this answer

























        • Note: Available in C# 7.0 +.

          – Adriani6
          16 hours ago













        23












        23








        23







        Yes ValueTuple / Named Tuple (available in C# 7.1). The advantage is its the most succinct, its immutable, and its easy to construct.




        The ValueTuple struct has fields named Item1, Item2, Item3, and so on,
        similar to the properties defined in the existing Tuple types.



        However, when you initialize a tuple, you can use new language
        features that give better names to each field. Doing so creates a
        named tuple. Named tuples still have elements named Item1, Item2,
        Item3 and so on. But they also have synonyms for any of those elements
        that you have named. You create a named tuple by specifying the names
        for each element.




        private (double first, double second) GetHeight()

        return (1,2);


        ...

        var result = ViaNamedValueTuple();
        Console.WriteLine($"result.first, result.second");

        var (first, second) = ViaNamedValueTuple();
        Console.WriteLine($"first, second");


        Classic Tuple



        C# tuple type




        The .NET Framework already has generic Tuple classes. These classes,
        however, had two major limitations. For one, the Tuple classes named
        their properties Item1, Item2, and so on. Those names carry no
        semantic information. Using these Tuple types does not enable
        communicating the meaning of each of the properties. The new language
        features enable you to declare and use semantically meaningful names
        for the elements in a tuple.




        public Tuple<int, int> ViaClassicTuple()

        return new Tuple<int, int>(1,2);


        ...

        var tuple = ViaClassicTuple();
        Console.WriteLine($"tuple.Item1, tuple.Item2");


        Classic struct



        struct (C# Reference)




        A struct type is a value type that is typically used to encapsulate
        small groups of related variables, such as the coordinates of a
        rectangle or the characteristics of an item in an inventory.




        public struct ClassicStruct

        public int First get; set;
        public int Second get; set;
        public ClassicStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ClassicStruct ViaClassicStruct()

        return new ClassicStruct(1, 2);


        ...

        var classicStruct = ViaClassicStruct();
        Console.WriteLine($"classicStruct.First, classicStruct.Second");


        Readonly struct



        readonly (C# Reference)




        The readonly modifier on a struct definition declares that the struct
        is immutable. Every instance field of the struct must be marked
        readonly, as shown in the following example:




        public readonly struct ReadonlyStruct

        public int First get;
        public int Second get;
        public ReadonlyStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ReadonlyStruct ViaReadonlyStruct()

        return new ReadonlyStruct(1, 2);


        ...


        var readonlyStruct = ViaReadonlyStruct();
        Console.WriteLine($"readonlyStruct.First, readonlyStruct.Second");


        Simple Class



        Classes (C# Programming Guide)




        A type that is defined as a class is a reference type. At run time,
        when you declare a variable of a reference type, the variable contains
        the value null until you explicitly create an instance of the class by
        using the new operator, or assign it an object of a compatible type
        that may have been created elsewhere




        public class SomeClass

        public int First get; set;
        public int Second get; set;
        public SomeClass(int first, int second)

        First = first;
        Second = second;



        ...

        public SomeClass ViaSomeClass()

        return new SomeClass(1, 2);


        ...


        var someClass = ViaSomeClass();
        Console.WriteLine($"someClass.First, someClass.Second");


        Out parameters



        out parameter modifier (C# Reference)




        The out keyword causes arguments to be passed by reference. It makes
        the formal parameter an alias for the argument, which must be a
        variable. In other words, any operation on the parameter is made on
        the argument. It is like the ref keyword, except that ref requires
        that the variable be initialized before it is passed. It is also like
        the in keyword, except that in does not allow the called method to
        modify the argument value. To use an out parameter, both the method
        definition and the calling method must explicitly use the out keyword.




        public bool ViaOutParams(out int first, out int second)

        first = 1;
        second = 2;
        return someCondition;


        ...

        if(ViaOutParams(out var firstInt, out var secondInt))
        Console.WriteLine($"firstInt, secondInt");


        Out Value Tuple



        public bool ViaOutTuple(out (int first,int second) output)

        output = (1, 2);
        return someCondition;


        ...

        if (ViaOutTuple(out var output))
        Console.WriteLine($"output.first, output.second");





        share|improve this answer















        Yes ValueTuple / Named Tuple (available in C# 7.1). The advantage is its the most succinct, its immutable, and its easy to construct.




        The ValueTuple struct has fields named Item1, Item2, Item3, and so on,
        similar to the properties defined in the existing Tuple types.



        However, when you initialize a tuple, you can use new language
        features that give better names to each field. Doing so creates a
        named tuple. Named tuples still have elements named Item1, Item2,
        Item3 and so on. But they also have synonyms for any of those elements
        that you have named. You create a named tuple by specifying the names
        for each element.




        private (double first, double second) GetHeight()

        return (1,2);


        ...

        var result = ViaNamedValueTuple();
        Console.WriteLine($"result.first, result.second");

        var (first, second) = ViaNamedValueTuple();
        Console.WriteLine($"first, second");


        Classic Tuple



        C# tuple type




        The .NET Framework already has generic Tuple classes. These classes,
        however, had two major limitations. For one, the Tuple classes named
        their properties Item1, Item2, and so on. Those names carry no
        semantic information. Using these Tuple types does not enable
        communicating the meaning of each of the properties. The new language
        features enable you to declare and use semantically meaningful names
        for the elements in a tuple.




        public Tuple<int, int> ViaClassicTuple()

        return new Tuple<int, int>(1,2);


        ...

        var tuple = ViaClassicTuple();
        Console.WriteLine($"tuple.Item1, tuple.Item2");


        Classic struct



        struct (C# Reference)




        A struct type is a value type that is typically used to encapsulate
        small groups of related variables, such as the coordinates of a
        rectangle or the characteristics of an item in an inventory.




        public struct ClassicStruct

        public int First get; set;
        public int Second get; set;
        public ClassicStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ClassicStruct ViaClassicStruct()

        return new ClassicStruct(1, 2);


        ...

        var classicStruct = ViaClassicStruct();
        Console.WriteLine($"classicStruct.First, classicStruct.Second");


        Readonly struct



        readonly (C# Reference)




        The readonly modifier on a struct definition declares that the struct
        is immutable. Every instance field of the struct must be marked
        readonly, as shown in the following example:




        public readonly struct ReadonlyStruct

        public int First get;
        public int Second get;
        public ReadonlyStruct(int first, int second)

        First = first;
        Second = second;



        ...

        public ReadonlyStruct ViaReadonlyStruct()

        return new ReadonlyStruct(1, 2);


        ...


        var readonlyStruct = ViaReadonlyStruct();
        Console.WriteLine($"readonlyStruct.First, readonlyStruct.Second");


        Simple Class



        Classes (C# Programming Guide)




        A type that is defined as a class is a reference type. At run time,
        when you declare a variable of a reference type, the variable contains
        the value null until you explicitly create an instance of the class by
        using the new operator, or assign it an object of a compatible type
        that may have been created elsewhere




        public class SomeClass

        public int First get; set;
        public int Second get; set;
        public SomeClass(int first, int second)

        First = first;
        Second = second;



        ...

        public SomeClass ViaSomeClass()

        return new SomeClass(1, 2);


        ...


        var someClass = ViaSomeClass();
        Console.WriteLine($"someClass.First, someClass.Second");


        Out parameters



        out parameter modifier (C# Reference)




        The out keyword causes arguments to be passed by reference. It makes
        the formal parameter an alias for the argument, which must be a
        variable. In other words, any operation on the parameter is made on
        the argument. It is like the ref keyword, except that ref requires
        that the variable be initialized before it is passed. It is also like
        the in keyword, except that in does not allow the called method to
        modify the argument value. To use an out parameter, both the method
        definition and the calling method must explicitly use the out keyword.




        public bool ViaOutParams(out int first, out int second)

        first = 1;
        second = 2;
        return someCondition;


        ...

        if(ViaOutParams(out var firstInt, out var secondInt))
        Console.WriteLine($"firstInt, secondInt");


        Out Value Tuple



        public bool ViaOutTuple(out (int first,int second) output)

        output = (1, 2);
        return someCondition;


        ...

        if (ViaOutTuple(out var output))
        Console.WriteLine($"output.first, output.second");






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 13 hours ago

























        answered 16 hours ago









        Michael RandallMichael Randall

        37.4k84372




        37.4k84372












        • Note: Available in C# 7.0 +.

          – Adriani6
          16 hours ago

















        • Note: Available in C# 7.0 +.

          – Adriani6
          16 hours ago
















        Note: Available in C# 7.0 +.

        – Adriani6
        16 hours ago





        Note: Available in C# 7.0 +.

        – Adriani6
        16 hours ago













        19














        Multiple ways:




        1. out parameters:



          private double GetHeight(out int anotherValue)

          anotherValue = 42;
          return 2;




        2. value-tuples:



          private (double height, int anotherValue) GetHeight()

          return (42, 2);



          (warning: value-tuples have known problems if used in .NET Standard libraries, as the assembly bindings from .NET Standard to .NET Framework are ... kinda fubar)




        3. custom return types:



          private Something GetHeight()

          return new Something(42, 2);



          (to avoid allocations, you may wish to define Something as a readonly struct in this scenario)







        share|improve this answer





























          19














          Multiple ways:




          1. out parameters:



            private double GetHeight(out int anotherValue)

            anotherValue = 42;
            return 2;




          2. value-tuples:



            private (double height, int anotherValue) GetHeight()

            return (42, 2);



            (warning: value-tuples have known problems if used in .NET Standard libraries, as the assembly bindings from .NET Standard to .NET Framework are ... kinda fubar)




          3. custom return types:



            private Something GetHeight()

            return new Something(42, 2);



            (to avoid allocations, you may wish to define Something as a readonly struct in this scenario)







          share|improve this answer



























            19












            19








            19







            Multiple ways:




            1. out parameters:



              private double GetHeight(out int anotherValue)

              anotherValue = 42;
              return 2;




            2. value-tuples:



              private (double height, int anotherValue) GetHeight()

              return (42, 2);



              (warning: value-tuples have known problems if used in .NET Standard libraries, as the assembly bindings from .NET Standard to .NET Framework are ... kinda fubar)




            3. custom return types:



              private Something GetHeight()

              return new Something(42, 2);



              (to avoid allocations, you may wish to define Something as a readonly struct in this scenario)







            share|improve this answer















            Multiple ways:




            1. out parameters:



              private double GetHeight(out int anotherValue)

              anotherValue = 42;
              return 2;




            2. value-tuples:



              private (double height, int anotherValue) GetHeight()

              return (42, 2);



              (warning: value-tuples have known problems if used in .NET Standard libraries, as the assembly bindings from .NET Standard to .NET Framework are ... kinda fubar)




            3. custom return types:



              private Something GetHeight()

              return new Something(42, 2);



              (to avoid allocations, you may wish to define Something as a readonly struct in this scenario)








            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 15 hours ago









            Toby Speight

            17.5k134469




            17.5k134469










            answered 16 hours ago









            Marc GravellMarc Gravell

            794k19821612566




            794k19821612566





















                3














                Yes, you can use Tuple:



                class Program

                static void Main(string[] args)

                Tuple<int, int> height = GetHeight();

                Console.WriteLine(height.Item1 + " - " + height.Item2);
                Console.ReadLine();


                private static Tuple<int, int> GetHeight()

                return new Tuple<int, int>(2, 3);




                OUTPUT:



                2 - 3






                share|improve this answer



























                  3














                  Yes, you can use Tuple:



                  class Program

                  static void Main(string[] args)

                  Tuple<int, int> height = GetHeight();

                  Console.WriteLine(height.Item1 + " - " + height.Item2);
                  Console.ReadLine();


                  private static Tuple<int, int> GetHeight()

                  return new Tuple<int, int>(2, 3);




                  OUTPUT:



                  2 - 3






                  share|improve this answer

























                    3












                    3








                    3







                    Yes, you can use Tuple:



                    class Program

                    static void Main(string[] args)

                    Tuple<int, int> height = GetHeight();

                    Console.WriteLine(height.Item1 + " - " + height.Item2);
                    Console.ReadLine();


                    private static Tuple<int, int> GetHeight()

                    return new Tuple<int, int>(2, 3);




                    OUTPUT:



                    2 - 3






                    share|improve this answer













                    Yes, you can use Tuple:



                    class Program

                    static void Main(string[] args)

                    Tuple<int, int> height = GetHeight();

                    Console.WriteLine(height.Item1 + " - " + height.Item2);
                    Console.ReadLine();


                    private static Tuple<int, int> GetHeight()

                    return new Tuple<int, int>(2, 3);




                    OUTPUT:



                    2 - 3







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 16 hours ago









                    JoKeRxbLaCkJoKeRxbLaCk

                    567218




                    567218





















                        2














                        Also you could use out parameters:



                        static void Main(string[] args)

                        int i, j;
                        GetHeight(out i, out j);


                        public static void GetHeight(out int i1, out int i2)

                        i1 = 1;
                        i2 = 2;






                        share|improve this answer



























                          2














                          Also you could use out parameters:



                          static void Main(string[] args)

                          int i, j;
                          GetHeight(out i, out j);


                          public static void GetHeight(out int i1, out int i2)

                          i1 = 1;
                          i2 = 2;






                          share|improve this answer

























                            2












                            2








                            2







                            Also you could use out parameters:



                            static void Main(string[] args)

                            int i, j;
                            GetHeight(out i, out j);


                            public static void GetHeight(out int i1, out int i2)

                            i1 = 1;
                            i2 = 2;






                            share|improve this answer













                            Also you could use out parameters:



                            static void Main(string[] args)

                            int i, j;
                            GetHeight(out i, out j);


                            public static void GetHeight(out int i1, out int i2)

                            i1 = 1;
                            i2 = 2;







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 16 hours ago









                            Michał TurczynMichał Turczyn

                            16.2k132241




                            16.2k132241





















                                0














                                Make a int array.Or another way is to create class.






                                share|improve this answer

























                                • an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

                                  – Marc Gravell
                                  16 hours ago












                                • Its not bad but its not needed in current question.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

                                  – Jonesopolis
                                  16 hours ago











                                • You can make a list too.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

                                  – Marc Gravell
                                  16 hours ago
















                                0














                                Make a int array.Or another way is to create class.






                                share|improve this answer

























                                • an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

                                  – Marc Gravell
                                  16 hours ago












                                • Its not bad but its not needed in current question.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

                                  – Jonesopolis
                                  16 hours ago











                                • You can make a list too.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

                                  – Marc Gravell
                                  16 hours ago














                                0












                                0








                                0







                                Make a int array.Or another way is to create class.






                                share|improve this answer















                                Make a int array.Or another way is to create class.







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited 16 hours ago

























                                answered 16 hours ago









                                Vuk UskokovicVuk Uskokovic

                                599




                                599












                                • an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

                                  – Marc Gravell
                                  16 hours ago












                                • Its not bad but its not needed in current question.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

                                  – Jonesopolis
                                  16 hours ago











                                • You can make a list too.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

                                  – Marc Gravell
                                  16 hours ago


















                                • an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

                                  – Marc Gravell
                                  16 hours ago












                                • Its not bad but its not needed in current question.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

                                  – Jonesopolis
                                  16 hours ago











                                • You can make a list too.

                                  – Vuk Uskokovic
                                  16 hours ago











                                • @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

                                  – Marc Gravell
                                  16 hours ago

















                                an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

                                – Marc Gravell
                                16 hours ago






                                an array is definitely a bad way here - that's pretty allocatey and the semantic meaning of each value is unclear; creating a class would also be relatively allocatey, but... a readonly struct would be fine

                                – Marc Gravell
                                16 hours ago














                                Its not bad but its not needed in current question.

                                – Vuk Uskokovic
                                16 hours ago





                                Its not bad but its not needed in current question.

                                – Vuk Uskokovic
                                16 hours ago













                                I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

                                – Jonesopolis
                                16 hours ago





                                I'd rather have a class of strongly typed values that mean something rather than guessing how many are in the array and what their values represent

                                – Jonesopolis
                                16 hours ago













                                You can make a list too.

                                – Vuk Uskokovic
                                16 hours ago





                                You can make a list too.

                                – Vuk Uskokovic
                                16 hours ago













                                @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

                                – Marc Gravell
                                16 hours ago






                                @VukUskokovic that (list) has all the problems that arrays have, plus an extra object and layer of abstraction; making it a list just exacerbates the problem unless we are semantically returning a list of something

                                – Marc Gravell
                                16 hours ago




                                Popular posts from this blog

                                Францішак Багушэвіч Змест Сям'я | Біяграфія | Творчасць | Мова Багушэвіча | Ацэнкі дзейнасці | Цікавыя факты | Спадчына | Выбраная бібліяграфія | Ушанаванне памяці | У філатэліі | Зноскі | Літаратура | Спасылкі | НавігацыяЛяхоўскі У. Рупіўся дзеля Бога і людзей: Жыццёвы шлях Лявона Вітан-Дубейкаўскага // Вольскі і Памідораў з песняй пра немца Адвакат, паэт, народны заступнік Ашмянскі веснікВ Минске появится площадь Богушевича и улица Сырокомли, Белорусская деловая газета, 19 июля 2001 г.Айцец беларускай нацыянальнай ідэі паўстаў у бронзе Сяргей Аляксандравіч Адашкевіч (1918, Мінск). 80-я гады. Бюст «Францішак Багушэвіч».Яўген Мікалаевіч Ціхановіч. «Партрэт Францішка Багушэвіча»Мікола Мікалаевіч Купава. «Партрэт зачынальніка новай беларускай літаратуры Францішка Багушэвіча»Уладзімір Іванавіч Мелехаў. На помніку «Змагарам за родную мову» Барэльеф «Францішак Багушэвіч»Памяць пра Багушэвіча на Віленшчыне Страчаная сталіца. Беларускія шыльды на вуліцах Вільні«Krynica». Ideologia i przywódcy białoruskiego katolicyzmuФранцішак БагушэвічТворы на knihi.comТворы Францішка Багушэвіча на bellib.byСодаль Уладзімір. Францішак Багушэвіч на Лідчыне;Луцкевіч Антон. Жыцьцё і творчасьць Фр. Багушэвіча ў успамінах ягоных сучасьнікаў // Запісы Беларускага Навуковага таварыства. Вільня, 1938. Сшытак 1. С. 16-34.Большая российская1188761710000 0000 5537 633Xn9209310021619551927869394п

                                Беларусь Змест Назва Гісторыя Геаграфія Сімволіка Дзяржаўны лад Палітычныя партыі Міжнароднае становішча і знешняя палітыка Адміністрацыйны падзел Насельніцтва Эканоміка Культура і грамадства Сацыяльная сфера Узброеныя сілы Заўвагі Літаратура Спасылкі НавігацыяHGЯOiТоп-2011 г. (па версіі ej.by)Топ-2013 г. (па версіі ej.by)Топ-2016 г. (па версіі ej.by)Топ-2017 г. (па версіі ej.by)Нацыянальны статыстычны камітэт Рэспублікі БеларусьШчыльнасць насельніцтва па краінахhttp://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/А. Калечыц, У. Ксяндзоў. Спробы засялення краю неандэртальскім чалавекам.І ў Менску былі мамантыА. Калечыц, У. Ксяндзоў. Старажытны каменны век (палеаліт). Першапачатковае засяленне тэрыторыіГ. Штыхаў. Балты і славяне ў VI—VIII стст.М. Клімаў. Полацкае княства ў IX—XI стст.Г. Штыхаў, В. Ляўко. Палітычная гісторыя Полацкай зямліГ. Штыхаў. Дзяржаўны лад у землях-княствахГ. Штыхаў. Дзяржаўны лад у землях-княствахБеларускія землі ў складзе Вялікага Княства ЛітоўскагаЛюблінская унія 1569 г."The Early Stages of Independence"Zapomniane prawdy25 гадоў таму было аб'яўлена, што Язэп Пілсудскі — беларус (фота)Наша вадаДакументы ЧАЭС: Забруджванне тэрыторыі Беларусі « ЧАЭС Зона адчужэнняСведения о политических партиях, зарегистрированных в Республике Беларусь // Министерство юстиции Республики БеларусьСтатыстычны бюлетэнь „Полаўзроставая структура насельніцтва Рэспублікі Беларусь на 1 студзеня 2012 года і сярэднегадовая колькасць насельніцтва за 2011 год“Индекс человеческого развития Беларуси — не было бы нижеБеларусь занимает первое место в СНГ по индексу развития с учетом гендерного факцёраНацыянальны статыстычны камітэт Рэспублікі БеларусьКанстытуцыя РБ. Артыкул 17Трансфармацыйныя задачы БеларусіВыйсце з крызісу — далейшае рэфармаванне Беларускі рубель — сусветны лідар па дэвальвацыяхПра змену коштаў у кастрычніку 2011 г.Бядней за беларусаў у СНД толькі таджыкіСярэдні заробак у верасні дасягнуў 2,26 мільёна рублёўЭканомікаГаласуем за ТОП-100 беларускай прозыСучасныя беларускія мастакіАрхитектура Беларуси BELARUS.BYА. Каханоўскі. Культура Беларусі ўсярэдзіне XVII—XVIII ст.Анталогія беларускай народнай песні, гуказапісы спеваўБеларускія Музычныя IнструментыБеларускі рок, які мы страцілі. Топ-10 гуртоў«Мясцовы час» — нязгаслая легенда беларускай рок-музыкіСЯРГЕЙ БУДКІН. МЫ НЯ ЗНАЕМ СВАЁЙ МУЗЫКІМ. А. Каладзінскі. НАРОДНЫ ТЭАТРМагнацкія культурныя цэнтрыПублічная дыскусія «Беларуская новая пьеса: без беларускай мовы ці беларуская?»Беларускія драматургі па-ранейшаму лепш ставяцца за мяжой, чым на радзіме«Працэс незалежнага кіно пайшоў, і дзяржаву турбуе яго непадкантрольнасць»Беларускія філосафы ў пошуках прасторыВсе идём в библиотекуАрхіваванаАб Нацыянальнай праграме даследавання і выкарыстання касмічнай прасторы ў мірных мэтах на 2008—2012 гадыУ космас — разам.У суседнім з Барысаўскім раёне пабудуюць Камандна-вымяральны пунктСвяты і абрады беларусаў«Мірныя бульбашы з малой краіны» — 5 непраўдзівых стэрэатыпаў пра БеларусьМ. Раманюк. Беларускае народнае адзеннеУ Беларусі скарачаецца колькасць злачынстваўЛукашэнка незадаволены мінскімі ўладамі Крадзяжы складаюць у Мінску каля 70% злачынстваў Узровень злачыннасці ў Мінскай вобласці — адзін з самых высокіх у краіне Генпракуратура аналізуе стан са злачыннасцю ў Беларусі па каэфіцыенце злачыннасці У Беларусі стабілізавалася крымінагеннае становішча, лічыць генпракурорЗамежнікі сталі здзяйсняць у Беларусі больш злачынстваўМУС Беларусі турбуе рост рэцыдыўнай злачыннасціЯ з ЖЭСа. Дазволіце вас абкрасці! Рэйтынг усіх службаў і падраздзяленняў ГУУС Мінгарвыканкама вырасАб КДБ РБГісторыя Аператыўна-аналітычнага цэнтра РБГісторыя ДКФРТаможняagentura.ruБеларусьBelarus.by — Афіцыйны сайт Рэспублікі БеларусьСайт урада БеларусіRadzima.org — Збор архітэктурных помнікаў, гісторыя Беларусі«Глобус Беларуси»Гербы и флаги БеларусиАсаблівасці каменнага веку на БеларусіА. Калечыц, У. Ксяндзоў. Старажытны каменны век (палеаліт). Першапачатковае засяленне тэрыторыіУ. Ксяндзоў. Сярэдні каменны век (мезаліт). Засяленне краю плямёнамі паляўнічых, рыбакоў і збіральнікаўА. Калечыц, М. Чарняўскі. Плямёны на тэрыторыі Беларусі ў новым каменным веку (неаліце)А. Калечыц, У. Ксяндзоў, М. Чарняўскі. Гаспадарчыя заняткі ў каменным векуЭ. Зайкоўскі. Духоўная культура ў каменным векуАсаблівасці бронзавага веку на БеларусіФарміраванне супольнасцей ранняга перыяду бронзавага векуФотографии БеларусиРоля беларускіх зямель ва ўтварэнні і ўмацаванні ВКЛВ. Фадзеева. З гісторыі развіцця беларускай народнай вышыўкіDMOZGran catalanaБольшая российскаяBritannica (анлайн)Швейцарскі гістарычны15325917611952699xDA123282154079143-90000 0001 2171 2080n9112870100577502ge128882171858027501086026362074122714179пппппп

                                ValueError: Expected n_neighbors <= n_samples, but n_samples = 1, n_neighbors = 6 (SMOTE) The 2019 Stack Overflow Developer Survey Results Are InCan SMOTE be applied over sequence of words (sentences)?ValueError when doing validation with random forestsSMOTE and multi class oversamplingLogic behind SMOTE-NC?ValueError: Error when checking target: expected dense_1 to have shape (7,) but got array with shape (1,)SmoteBoost: Should SMOTE be ran individually for each iteration/tree in the boosting?solving multi-class imbalance classification using smote and OSSUsing SMOTE for Synthetic Data generation to improve performance on unbalanced dataproblem of entry format for a simple model in KerasSVM SMOTE fit_resample() function runs forever with no result